[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xalan entity error when a Java method

Subject: Xalan entity error when a Java method
From: "Don Leckie" <don@xxxxxxxxxxxxx>
Date: Sun, 16 Nov 2003 17:29:17 -0500
org.apache.xalan.transformer.transformerimpl.trans
Hello,

I searched the archives but found nothing that could solve my problem.

I have an input XML file containing an element like this:
<delimiter>&amp;</delimiter>.  When I use the following:
<outputField>
   <value-of select='InputDoc/header/controls/delimiter'/>
</outputField>

The ampersand is correctly moved to the output field.

However, when I call a Java method to do some processing, null is passed
instead of the ampersand.  The Xalan error message I get is:
[Fatal Error] :1:24: The entity name must immediately follow the '&' in the
entity reference.

It loooks like Xalan resolved the entity and is passing the &, but one of
the extensions thinks its the beginning of an entity.

I think the error message is being generated by a Xalan extension, but I
cannot determine this.  Anyhow, null is being passed to my Java method.

Has anyone encountered this problem?

Here is a stacktrace:
        at
com.contivo.runtime.common.TText.validatePresentation(TText.java:59)
        at
com.contivo.runtime.common.TFormater.isCorrectFormat(TFormater.java:339)
        at
com.contivo.runtime.common.TFormater.validateNTrimSourceString(TFormater.jav
a:1414)
        at
com.contivo.runtime.common.TFormater.validateNTrimSourceString(TFormater.jav
a:1315)
        at
com.contivo.runtime.common.TXSLTFormater.validateNTrimSourceString(TXSLTForm
ater.java:466)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(Extension
HandlerJavaClass.java:282)
        at
org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java
:257)
        at
org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:181)
        at
org.apache.xpath.Expression.executeCharsToContentHandler(Expression.java:301
)
        at
org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:319)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:430)
        at
org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:27
9)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:177)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.transformer.TransformerImpl.transformToRTF(TransformerImpl.
java:1725)
        at
org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:327)
        at
org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:282)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.transformer.TransformerImpl.transformToRTF(TransformerImpl.
java:1725)
        at
org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:327)
        at
org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:282)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
678)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
678)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
678)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
678)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2182)
        at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2008)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1171)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
638)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
1088)
        at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
1066)
        at org.apache.xalan.xslt.Process.main(Process.java:865)

Thank you,
Don Leckie


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.