Re: Confused with Fop extensions, distinct.

2002-04-17 Thread John Austin

On Tuesday 16 April 2002 11:13, you wrote:
 I have tried to read the docs.   I had used distinct before but not
 in an embedded application.

 Function not supported.   Is my error message.

 I have inclued my stack Trace.  My includes in my application. and my
 stylesheet.
 Thanks in advance for any help you can give.

Check your spelling in namespace declarations and make certain the 
class name is coirrect for the version of Xalan you are using.


I posted the following to cocoon-users a few weeks ago:


This note is mostly for the benefit of anyone else searching for help 
with Redirect. Sorry if Xalan is a bit off topic for Cocoon2, but I 
expect that a lot of XSLT users will be using Cocoon as a framework for 
Xalan-J/XSLT-based applications.

I spotted Redirect in Chapter 8(?) of XSLT by Doug Tidwell, August 
2001, O'Reilly and Associates. It does work in Cocoon2 but I had a few 
problems getting it to run. I finally solved it by looking at the 
Xalan-J docs at xml.apache.org as well as the source code for Redirect.

The Redirect class seems to have moved from 
org.apache.xalan.xslt.extensions.Redirect to the more concise
org.apache.xalan.lib.Redirect.

The comments in Redirect are actually useful! (thank you Mr Boag!)

It appears that you need to include several namespaces in the 
stylesheet tag. This was another source of 'the fog of war' for me.

xsl:stylesheet version=1.0
 xmlns:lxslt=http://xml.apache.org/xslt;
 xmlns:redirect=org.apache.xalan.lib.Redirect
 extension-element-prefixes=redirect
 ... rest omitted ...

This did not work for me when I followed examples from various sources.

I have one minor complaint about Redirect (may apply to all extensions).
This facility is terrific but it is strangely silent when things go 
wrong. For example, I used file=concat(... at one point and created a 
directory named concat(

When I had mis-spelled namespace URI's nothing worked and it did so 
silently. When the lxslt declaration was missing ... same thing. I know 
I had perms wrong and was rewarded again with silence.

Thanks again. Hope this helps.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Confused with Fop extensions, distinct.

2002-04-16 Thread Rich Van Deren ()
I have tried to read the docs.   I had used distinct before but not in an embedded application.

Function not supported.   Is my error message.

I have inclued my stack Trace.  My includes in my application. and my stylesheet.
Thanks in advance for any help you can give.

xsl:template match="ClientHistory">  distinct used here.

Trace:
java.lang.RuntimeException: Function not supported!
at org.apache.xml.utils.UnImplNode.error(UnImplNode.java:87)
at org.apache.xml.utils.UnImplNode.getNodeValue(UnImplNode.java:570)
at org.apache.xalan.lib.Extensions.distinct(Extensions.java:210)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java:332)
at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:253)
at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:141)
at org.apache.xpath.XPath.execute(XPath.java:269)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:388)
at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:228)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.jav

stylesheet:

xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan"
>
xsl:output method="xml"/>

xsl:template match="/">

fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

!-- defines page layout -->
fo:layout-master-set>

fo:simple-page-master master-name="simple"
page-height="29.7cm" 
page-width="21cm"
margin-top="1.5cm" 
margin-bottom="2cm" 
margin-left="2.5cm" 
margin-right="2.5cm">
fo:region-body margin-top="1cm"/>
fo:region-before extent="1.5cm"/>
fo:region-after extent="1.5cm"/>
/fo:simple-page-master>
/fo:layout-master-set>

fo:page-sequence master-reference ="simple">
fo:static-content flow-name="xsl-region-before">
fo:block text-align="end" 
font-size="10pt" 
font-family="serif" 
line-height="14pt" >
My Resume - p. fo:page-number/>
/fo:block>
/fo:static-content> 
fo:flow flow-name="xsl-region-body">
xsl:apply-templates/>
/fo:flow>
/fo:page-sequence>
/fo:root>
/xsl:template>
xsl:template match="TestSummary">/xsl:template>
xsl:template match="Copyright">/xsl:template>
xsl:template match="DefaultCharge">/xsl:template>
xsl:template match="ResumePdf">/xsl:template>
xsl:template match="ResumeHtml">/xsl:template>
xsl:template match="ResumeLanguage">/xsl:template>
xsl:template match="ResumeProfession">/xsl:template>
xsl:template match="MovieBaseUriString">/xsl:template>
xsl:template match="InterviewMovieUriString">/xsl:template>
xsl:template match="CasualPhotoMovieUriString">/xsl:template>
xsl:template match="FormalPhotoMovieUriString">/xsl:template>
xsl:template match="Worker">
fo:block font-size="18pt" 
font-family="sans-serif" 
line-height="24pt"
space-before.optimum="15pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="center"
>
xsl:apply-templates select="Contact/PersonName/FullName"/>xsl:text>/xsl:text>
/fo:block>
fo:block font-size="12pt" 
font-family="sans-serif" 
line-height="14pt"
space-before.optimum="10pt"
space-after.optimum="9pt"
text-align="start"
padding-top="3pt">
fo:list-block provisional-distance-between-starts="4.0cm"
provisional-label-separation=".35cm">
fo:list-item >
fo:list-item-label 

Confused with Fop extensions, distinct.

2002-04-16 Thread Rich Van Deren ()
I have tried to read the docs.   I had used distinct before but not in an embedded application.

Function not supported.   Is my error message.

I have inclued my stack Trace.  My includes in my application. and my stylesheet.
Thanks in advance for any help you can give.

xsl:template match="ClientHistory">  distinct used here.

Trace:
java.lang.RuntimeException: Function not supported!
at org.apache.xml.utils.UnImplNode.error(UnImplNode.java:87)
at org.apache.xml.utils.UnImplNode.getNodeValue(UnImplNode.java:570)
at org.apache.xalan.lib.Extensions.distinct(Extensions.java:210)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java:332)
at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:253)
at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:141)
at org.apache.xpath.XPath.execute(XPath.java:269)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:388)
at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:228)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.jav

stylesheet:

xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan"
>
xsl:output method="xml"/>

xsl:template match="/">

fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

!-- defines page layout -->
fo:layout-master-set>

fo:simple-page-master master-name="simple"
page-height="29.7cm" 
page-width="21cm"
margin-top="1.5cm" 
margin-bottom="2cm" 
margin-left="2.5cm" 
margin-right="2.5cm">
fo:region-body margin-top="1cm"/>
fo:region-before extent="1.5cm"/>
fo:region-after extent="1.5cm"/>
/fo:simple-page-master>
/fo:layout-master-set>

fo:page-sequence master-reference ="simple">
fo:static-content flow-name="xsl-region-before">
fo:block text-align="end" 
font-size="10pt" 
font-family="serif" 
line-height="14pt" >
My Resume - p. fo:page-number/>
/fo:block>
/fo:static-content> 
fo:flow flow-name="xsl-region-body">
xsl:apply-templates/>
/fo:flow>
/fo:page-sequence>
/fo:root>
/xsl:template>
xsl:template match="TestSummary">/xsl:template>
xsl:template match="Copyright">/xsl:template>
xsl:template match="DefaultCharge">/xsl:template>
xsl:template match="ResumePdf">/xsl:template>
xsl:template match="ResumeHtml">/xsl:template>
xsl:template match="ResumeLanguage">/xsl:template>
xsl:template match="ResumeProfession">/xsl:template>
xsl:template match="MovieBaseUriString">/xsl:template>
xsl:template match="InterviewMovieUriString">/xsl:template>
xsl:template match="CasualPhotoMovieUriString">/xsl:template>
xsl:template match="FormalPhotoMovieUriString">/xsl:template>
xsl:template match="Worker">
fo:block font-size="18pt" 
font-family="sans-serif" 
line-height="24pt"
space-before.optimum="15pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="center"
>
xsl:apply-templates select="Contact/PersonName/FullName"/>xsl:text>/xsl:text>
/fo:block>
fo:block font-size="12pt" 
font-family="sans-serif" 
line-height="14pt"
space-before.optimum="10pt"
space-after.optimum="9pt"
text-align="start"
padding-top="3pt">
fo:list-block provisional-distance-between-starts="4.0cm"
provisional-label-separation=".35cm">
fo:list-item >
fo:list-item-label 

Confused with Fop extensions, distinct.

2002-04-16 Thread Rich Van Deren ()

I have tried to read the docs.   I had used distinct before but not in an embedded application.

Function not supported.   Is my error message.

I have inclued my stack Trace.  My includes in my application. and my stylesheet.
Thanks in advance for any help you can give.

xsl:template match="ClientHistory">  distinct used here.

Trace:
java.lang.RuntimeException: Function not supported!
at org.apache.xml.utils.UnImplNode.error(UnImplNode.java:87)
at org.apache.xml.utils.UnImplNode.getNodeValue(UnImplNode.java:570)
at org.apache.xalan.lib.Extensions.distinct(Extensions.java:210)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java:332)
at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:253)
at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:141)
at org.apache.xpath.XPath.execute(XPath.java:269)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:388)
at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:228)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:739)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.jav

stylesheet:

xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" 
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan"
>
xsl:output method="xml"/>

xsl:template match="/">

fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

!-- defines page layout -->
fo:layout-master-set>

fo:simple-page-master master-name="simple"
page-height="29.7cm" 
page-width="21cm"
margin-top="1.5cm" 
margin-bottom="2cm" 
margin-left="2.5cm" 
margin-right="2.5cm">
fo:region-body margin-top="1cm"/>
fo:region-before extent="1.5cm"/>
fo:region-after extent="1.5cm"/>
/fo:simple-page-master>
/fo:layout-master-set>

fo:page-sequence master-reference ="simple">
fo:static-content flow-name="xsl-region-before">
fo:block text-align="end" 
font-size="10pt" 
font-family="serif" 
line-height="14pt" >
My Resume - p. fo:page-number/>
/fo:block>
/fo:static-content> 
fo:flow flow-name="xsl-region-body">
xsl:apply-templates/>
/fo:flow>
/fo:page-sequence>
/fo:root>
/xsl:template>
xsl:template match="TestSummary">/xsl:template>
xsl:template match="Copyright">/xsl:template>
xsl:template match="DefaultCharge">/xsl:template>
xsl:template match="ResumePdf">/xsl:template>
xsl:template match="ResumeHtml">/xsl:template>
xsl:template match="ResumeLanguage">/xsl:template>
xsl:template match="ResumeProfession">/xsl:template>
xsl:template match="MovieBaseUriString">/xsl:template>
xsl:template match="InterviewMovieUriString">/xsl:template>
xsl:template match="CasualPhotoMovieUriString">/xsl:template>
xsl:template match="FormalPhotoMovieUriString">/xsl:template>
xsl:template match="Worker">
fo:block font-size="18pt" 
font-family="sans-serif" 
line-height="24pt"
space-before.optimum="15pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="center"
>
xsl:apply-templates select="Contact/PersonName/FullName"/>xsl:text>/xsl:text>
/fo:block>
fo:block font-size="12pt" 
font-family="sans-serif" 
line-height="14pt"
space-before.optimum="10pt"
space-after.optimum="9pt"
text-align="start"
padding-top="3pt">
fo:list-block provisional-distance-between-starts="4.0cm"
provisional-label-separation=".35cm">
fo:list-item >
fo:list-item-label 

Re: Confused with Fop extensions, distinct.

2002-04-16 Thread J.Pietschmann

Rich Van Deren wrote:
 I have tried to read the docs. I had used distinct before but not in an 
 embedded application.
 Function not supported. Is my error message.
...
 xsl:for-each 
 select=xalan:distinct(/Resume/WorkHistoryInfo/...

This is an extension function. You appear to have
a problem with the Xalan installation which is used
by your embedded FOP.

Either your application uses an outdated Xalan version
(as for example WebSphere 3.x does), or extension
functions have been disabled. Find a Xalan version
which works and install it so that your application
uses it. Consult the manuals of your application for
how to do this, usually you have to copy your Xalan
jars into a certain directory, and/or adding them
to the classpath.

Alternatively, get rid of the extension function and
use Munchean Grouping. Start here:
   http://www.jenitennison.com/xslt/keys.html

J.Pietschmann


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Confused with Fop extensions, distinct.

2002-04-16 Thread Jeremias Maerki

Maybe the namespace declaration for the Xalan extensions is missing:

xmlns:xalan=http://xml.apache.org/xalan;

 Rich Van Deren wrote:
  I have tried to read the docs. I had used distinct before but not in an 
  embedded application.
  Function not supported. Is my error message.
 ...
  xsl:for-each 
  select=xalan:distinct(/Resume/WorkHistoryInfo/...
 
 This is an extension function. You appear to have
 a problem with the Xalan installation which is used
 by your embedded FOP.
 
 Either your application uses an outdated Xalan version
 (as for example WebSphere 3.x does), or extension
 functions have been disabled. Find a Xalan version
 which works and install it so that your application
 uses it. Consult the manuals of your application for
 how to do this, usually you have to copy your Xalan
 jars into a certain directory, and/or adding them
 to the classpath.
 
 Alternatively, get rid of the extension function and
 use Munchean Grouping. Start here:
http://www.jenitennison.com/xslt/keys.html

Cheers,
Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Tel. +41 41 317 2020 - Fax +41 41 317 2029
Internet http://www.outline.ch


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]