You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Paul Winder <pw...@arbortext.com> on 2001/02/28 01:13:58 UTC

Xalan complains about Docbook fo stylesheet

Hi,

Running Xalan 2 on our XML Docbook sample, and using Norm Walsh's XSL 
DocBook Stylesheet, I get the following failure:

   SystemID: 
file:///vobs/adept-release/epic/stylesheets/xsldocbook10/fo/table.xsl; 
Line#: 104; Column#: 11
   javax.xml.transform.TransformerException: xsl:text is not allowed in 
this position in the stylesheet!

Looking at the stylesheet I find, starting at line 102:

   <xsl:choose>
     <xsl:when test="$count>count($colspecs)">
         &RE;
      <fo:table-column column-number="{$countcol}">
         <xsl:attribute name="column-width">
           <xsl:call-template name="calc.column.width"/>
         </xsl:attribute>
      </fo:table-column>
    </xsl:when>
...

Column 11 is the character after the semicolon on line 104.

&RE; is defined at the top of the file:
     <!ENTITY RE "<xsl:text>&#13;&#10;</xsl:text>">

(This is v 1.9 (2000/05/07 14:49:02) of table.xsl).

Is Xalan being too picky or is there a real problem here?  The consensus 
here at Arbortext seems to be that the
stylesheet is OK.

I'm running Xalan 2.0.0 on Solaris and using 
TransformerFactory.newTemplates() to compile the stylesheet.

Please copy me on your response; I'm not currently subscribed.

Paul Winder
Arbortext

PS:  The stack dump is:

XSLT PROCESSING ERROR: xsl:text is not allowed in this position in the 
stylesheet!
; SystemID: 
file:///vobs/adept-release/epic/stylesheets/xsldocbook10/fo/table.xsl; 
Line#: 104; Column#: 11
javax.xml.transform.TransformerException: xsl:text is not allowed in this 
position in the stylesheet!
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at 
javax.xml.transform.TransformerException.<init>(TransformerException.java:223)
         at 
org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:852)
         at 
org.apache.xalan.processor.StylesheetHandler.getProcessorFor(Compiled Code)
         at 
org.apache.xalan.processor.StylesheetHandler.startElement(Compiled Code)
         at org.apache.xerces.parsers.SAXParser.startElement(Compiled Code)
         at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(Compiled 
Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Compiled 
Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled Code)
         at org.apache.xerces.framework.XMLParser.parse(Compiled Code)
         at org.apache.xalan.processor.ProcessorInclude.parse(Compiled Code)
         at 
org.apache.xalan.processor.ProcessorInclude.startElement(Compiled Code)
         at 
org.apache.xalan.processor.StylesheetHandler.startElement(Compiled Code)
         at org.apache.xerces.parsers.SAXParser.startElement(Compiled Code)
         at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(Compiled 
Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(Compiled Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Compiled 
Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled Code)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
         at 
org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:303)
         at 
org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:189)
         at 
org.apache.xalan.processor.StylesheetHandler.startElement(Compiled Code)
         at org.apache.xerces.parsers.SAXParser.startElement(Compiled Code)
         at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(Compiled 
Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(Compiled Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Compiled 
Code)
         at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled Code)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
         at 
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:795)
         at 
com.arbortext.compose.ATIComposer.finishConstructor(ATIComposer.java:127)
           ...




Re: Xalan complains about Docbook fo stylesheet

Posted by Gary L Peskin <ga...@firstech.com>.
Paul Winder wrote:
> 
> Hi,
> 
> Running Xalan 2 on our XML Docbook sample, and using Norm Walsh's XSL
> DocBook Stylesheet, I get the following failure:
> 
>    SystemID:
> file:///vobs/adept-release/epic/stylesheets/xsldocbook10/fo/table.xsl;
> Line#: 104; Column#: 11
>    javax.xml.transform.TransformerException: xsl:text is not allowed in
> this position in the stylesheet!
> 
> Looking at the stylesheet I find, starting at line 102:
> 
>    <xsl:choose>
>      <xsl:when test="$count>count($colspecs)">
>          &RE;
>       <fo:table-column column-number="{$countcol}">
>          <xsl:attribute name="column-width">
>            <xsl:call-template name="calc.column.width"/>
>          </xsl:attribute>
>       </fo:table-column>
>     </xsl:when>
> ...
> 
> Column 11 is the character after the semicolon on line 104.
> 
> &RE; is defined at the top of the file:
>      <!ENTITY RE "<xsl:text>&#13;&#10;</xsl:text>">
> 
> (This is v 1.9 (2000/05/07 14:49:02) of table.xsl).
> 
> Is Xalan being too picky or is there a real problem here?  The consensus
> here at Arbortext seems to be that the
> stylesheet is OK.
> 
> I'm running Xalan 2.0.0 on Solaris and using
> TransformerFactory.newTemplates() to compile the stylesheet.
> 
> Please copy me on your response; I'm not currently subscribed.
> 
> Paul Winder
> Arbortext

Paul --

I looked at this a few days ago for Albert Tsun and it seemed to be a
bug in Xerces.  It is calling our ContentHandler with an invalid local
name.  I haven't been over to the Xerces side lately to check on the
status of this issue.

Gary