You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Chad Williamson <ch...@bownetworks.com> on 2004/01/21 23:36:39 UTC

Anyone seen this XSLT error before? Upgraded from Xalan 1.6 to 1.7



I've been using Xalan 1.6(with Xerces 2.3.0) as my XSLT transform engine with no
problems.  I gave our customer the files and they are using Xalan 1.7(with
Xerces 2.4.0) and they get this error and I don't...  I'm investigating the
differences in versions and platforms, but was hoping that someone else may have
seen it :-)  I've been generating my xsl files using Schematron, but I think
this problem is unrelated to that.

Thanks, chad

>Xalan -o out_put router2.xml shiva-temp.xsl

XSLT error: xsl:text  or literal text is not allowed at this position in
the stylesheet
(file:///home/shiva/Xalan1_7/xml-xalan/c/testfiles/shiva-temp.xsl, line 113,
column 71)

Snippet from stylesheet below:

Checking section "Alarm Validation": <axsl:apply-templates select="/"
mode="M42"/>

Checking section "UniqueID Validation": <axsl:apply-templates select="/"
mode="M43"/>
</axsl:template>
<axsl:template match="ConfigurationRoot" priority="4000" mode="M1">
<axsl:choose>
<axsl:when test="@ConfigurationVersion"/>
<axsl:otherwise>
     Assertion fails: "ConfigurationVersion is missing!"  at
         <axsl:apply-templates mode="schematron-get-full-path" select="."/>
        &lt;<axsl:value-of select="name()"/>
<axsl:for-each select="@*">
<axsl:value-of select="' '"/>
<axsl:value-of select="name()"/>="<axsl:value-of
select="."/>"</axsl:for-each>&gt;...&lt;/&gt;

Please check RouterId = '<axsl:text xml:space="preserve"> </axsl:text>
<----- Line 113.
<axsl:value-of select=" ancestor::Router/@RouterID "/>
<axsl:text xml:space="preserve"> </axsl:text>' and correct this issue.
</axsl:otherwise>
</axsl:choose>
<axsl:choose>
<axsl:when test="string-length(normalize-space(@ConfigurationVersion))=8 and
substring(normalize-space(@ConfigurationVersion),3,1)='.' and
substring(normalize-space(@ConfigurationVersion),6,1)='.' and
number(substring(normalize-space(@ConfigurationVersion),1,2))&gt;=0 and
number(substring(normalize-space(@ConfigurationVersion),4,2))&gt;=0 and
number(substring(normalize-space(@ConfigurationVersion),7,2))&gt;=0"/>
<axsl:otherwise>
     Assertion fails: "ConfigurationVersion must be in the following format:
XX.YY.ZZ, where X, Y, and Z are in the range of 0 to 9!"  at
         <axsl:apply-templates mode="schematron-get-full-path" select="."/>
        &lt;<axsl:value-of select="name()"/>
<axsl:for-each select="@*">
<axsl:value-of select="' '"/>
<axsl:value-of select="name()"/>="<axsl:value-of
select="."/>"</axsl:for-each>&gt;...&lt;/&gt;

Please check RouterId = '<axsl:text xml:space="preserve"> </axsl:text>
<axsl:value-of select=" ancestor::Router/@RouterID "/>
<axsl:text xml:space="preserve"> </axsl:text>' and correct this issue.
</axsl:otherwise>
</axsl:choose>
<axsl:choose>
<axsl:when test="@FileVersion"/>
<axsl:otherwise>
     Assertion fails: "FileVersion is missing!"  at
         <axsl:apply-templates mode="schematron-get-full-path" select="."/>
        &lt;<axsl:value-of select="name()"/>
<axsl:for-each select="@*">
<axsl:value-of select="' '"/>
<axsl:value-of select="name()"/>="<axsl:value-of
select="."/>"</axsl:for-each>&gt;...&lt;/&gt;

____________________________________________________________

Chad Williamson, B.Sc. CE                                    BOW Networks Inc.
Software Developer                                                 #200, 550-71
Avenue S.E.
TEL: (403) 640-8422                                                  Calgary,
Alberta
FAX: (403) 253-8979                                                  T2H 0S6
e-mail: chad.williamson@bownetworks.com
---------------------------------------------------------------------------------------------------------



Re: Anyone seen this XSLT error before? Upgraded from Xalan 1.6 to 1.7

Posted by da...@us.ibm.com.



I'm not sure Chad really wants a non-breaking space here.

Chad, can you try simply removing the xml:space attribute, since it's not
really needed anyway.

Thanks!

Dave



                                                                                                                                 
                      Eric Pailleau                                                                                              
                      <er...@numlog.fr>         To:      xalan-c-users@xml.apache.org                                             
                                               cc:      (bcc: David N Bertoni/Cambridge/IBM)                                     
                      01/22/2004 02:09         Subject: Re: Anyone seen this XSLT error before? Upgraded from Xalan 1.6 to 1.7   
                      AM                                                                                                         
                      Please respond                                                                                             
                      to xalan-c-users                                                                                           
                                                                                                                                 



Chad Williamson wrote:
>
>
> I've been using Xalan 1.6(with Xerces 2.3.0) as my XSLT transform engine
with no
> problems.  I gave our customer the files and they are using Xalan 1.7
(with
> Xerces 2.4.0) and they get this error and I don't...  I'm investigating
the
> differences in versions and platforms, but was hoping that someone else
may have
> seen it :-)  I've been generating my xsl files using Schematron, but I
think
> this problem is unrelated to that.
>
> Thanks, chad
>
>
>>Xalan -o out_put router2.xml shiva-temp.xsl

Try to replace :
<axsl:text xml:space="preserve"> </axsl:text>

with a simple  &nbsp;(if declared) or &#160; (if not)

indivisible blank in HTML ...

Since a correction occurs ...


@+





Re: Anyone seen this XSLT error before? Upgraded from Xalan 1.6 to 1.7

Posted by Eric Pailleau <er...@numlog.fr>.
Chad Williamson wrote:
> 
> 
> I've been using Xalan 1.6(with Xerces 2.3.0) as my XSLT transform engine with no
> problems.  I gave our customer the files and they are using Xalan 1.7(with
> Xerces 2.4.0) and they get this error and I don't...  I'm investigating the
> differences in versions and platforms, but was hoping that someone else may have
> seen it :-)  I've been generating my xsl files using Schematron, but I think
> this problem is unrelated to that.
> 
> Thanks, chad
> 
> 
>>Xalan -o out_put router2.xml shiva-temp.xsl

Try to replace :
<axsl:text xml:space="preserve"> </axsl:text>

with a simple  &nbsp;(if declared) or &#160; (if not)

indivisible blank in HTML ...

Since a correction occurs ...


@+



Re: Anyone seen this XSLT error before? Upgraded from Xalan 1.6 to 1.7

Posted by da...@us.ibm.com.



> I've been using Xalan 1.6(with Xerces 2.3.0) as my XSLT transform engine
with no
> problems.  I gave our customer the files and they are using Xalan 1.7
(with
> Xerces 2.4.0) and they get this error and I don't...  I'm investigating
the
> differences in versions and platforms, but was hoping that someone else
may have
> seen it :-)  I've been generating my xsl files using Schematron, but I
think
> this problem is unrelated to that.

We did tighten up some code where Xalan 1.6 was allowing text where it is
not allowed, so we could just be catching something that's illegal.  The
other possibility is we got overzealous, introduced a bug, and the
stylesheet is OK.

Can you create a bugzilla report and attach a complete stylesheet that
reproduces the problem?  That way, we can start looking into this sooner.

Thanks!

Dave