You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/30 21:15:58 UTC

DO NOT REPLY [Bug 4523] New: - xsltc fails impincl16 problems with predicates in imported xsl

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4523>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4523

xsltc fails impincl16 problems with predicates in imported xsl

           Summary: xsltc fails impincl16 problems with predicates in
                    imported xsl
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: tom.amiro@sun.com


Running XSLTC with Xerces Parser on impincl16
pred: pred(=(cast(step("self", -1), node-set), cast(int-expr(117), real)))
exp: =(cast(step("self", -1), node-set), cast(int-expr(117), real))
pred: pred(and(and(funcall(not, [=(cast(step("self", -1), node-set),
cast(int-expr(117), real))]), and(>(funcall(position, []), int-expr(225)),
<(funcall(position, []), int-expr(375)))), or(=(step("attribute", 27),
literal-expr(yes)), =(step("attribute", 28), literal-expr(nope)))))
exp: and(and(funcall(not, [=(cast(step("self", -1), node-set),
cast(int-expr(117), real))]), and(>(funcall(position, []), int-expr(225)),
<(funcall(position, []), int-expr(375)))), or(=(step("attribute", 27),
literal-expr(yes)), =(step("attribute", 28), literal-expr(nope))))
pred: pred(cast(step("attribute", 25), boolean))
exp: cast(step("attribute", 25), boolean)
Exception in thread "main" java.lang.ExceptionInInitializerError:
java.util.MissingResourceException: Can't find bundle for base name
org.apache.xalan.xsltc.runtime.ErrorMessages, locale en
        at
java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:707)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:679)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:559)
        at org.apache.xalan.xsltc.runtime.BasisLibrary.<clinit>(Unknown Source)
        at impincl16.applyTemplates()
        at impincl16.applyTemplates()
        at impincl16.applyTemplates()
        at impincl16.transform()
        at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(Unknown
Source)
        at org.apache.xalan.xsltc.cmdline.Transform.doTransform(Unknown Source)
        at org.apache.xalan.xsltc.cmdline.Transform.main(Unknown Source)


impincl16.xsl
-------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <!-- FileName: ImpIncl16 -->
  <!-- Document: http://www.w3.org/TR/xpath -->
  <!-- DocVersion: 19991116 -->
  <!-- Section: 2.6.2 -->
  <!-- Creator: David Marston -->
  <!-- Purpose: Test of importing a basic stylesheet involving matching. -->

<xsl:import href="fragments/imp16all.xsl"/>

</xsl:stylesheet>


fragments/imp16all.xsl
----------------------
<?xml version="1.0"?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <!-- Purpose: To be imported by ../ImpIncl16. -->

<xsl:template match="doc">
  <out>
    <xsl:apply-templates/>
  </out>
</xsl:template>

<xsl:template
match="aac|llh|oop|aah|ssb|iii|rre|eek|xxo|aar|sst|bbd|eeo|xxi|ddg|nne">
  <!-- Template for big union -->
  <xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="//yyj">
  <!-- Template for Absolute Location Path covering whole document. -->
  <xsl:text>Middle: </xsl:text><xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="aaa[@val]">
  <!-- Template for attribute -->
  <xsl:text>@val=</xsl:text><xsl:value-of select="@val"/><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="*[.=117]">
  <!-- Template for element's value -->
  <xsl:text>The node containing 117 is </xsl:text><xsl:value-of
select="name(.)"/><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="*[(not(.=117) and ((position() &gt; 225) and (position()
&lt; 375))) and ((@century='yes') or (@foo='nope'))]">
  <!-- Template for compound boolean expression -->
  <xsl:text>A century node is </xsl:text><xsl:value-of
select="name(.)"/><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="text()"/><!-- suppress extraneous text -->

</xsl:stylesheet>

impincl16.xml
-------------
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<aaa att="no" foo="nope" val="yes">1</aaa>
<bbb>2</bbb>
<ccc>3</ccc>
<ddd>4</ddd>
<eee>5</eee>
<fff>6</fff>
<ggg>7</ggg>
<hhh>8</hhh>
<iii>9</iii>
<jjj>10</jjj>
<kkk>11</kkk>
<lll>12</lll>
<mmm>13</mmm>
<nnn>14</nnn>
<ooo>15</ooo>
<ppp>16</ppp>
<qqq>17</qqq>
[ cut off ]