xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deborah Pickett (JIRA)" <xalan-...@xml.apache.org>
Subject [jira] Created: (XALANJ-2251) Trace Selection Event (-TS) interferes with output (still)
Date Fri, 23 Dec 2005 01:00:30 GMT
Trace Selection Event (-TS) interferes with output (still)
----------------------------------------------------------

         Key: XALANJ-2251
         URL: http://issues.apache.org/jira/browse/XALANJ-2251
     Project: XalanJ2
        Type: Bug
  Components: Trace-facility  
    Versions: 2.7    
 Environment: Windows XP, Java 1.4.2_08, cygwin
    Reporter: Deborah Pickett


Bugzilla ID 30129 isn't completely fixed, it seems.

(deborah@au-dpickett)[90] /cygdrive/c/temp
$ cat doc.xml
<doc>
<person family-name="Bloggs" given-name="Joe"/>
</doc>


(deborah@au-dpickett)[91] /cygdrive/c/temp
$ cat t.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="person">
  <p>
    <xsl:value-of select="@given-name"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="@family-name"/>
  </p>
</xsl:template>

</xsl:stylesheet>

(deborah@au-dpickett)[92] /cygdrive/c/temp
$ java -jar c:/Projects/xalan-j_2_7_0/xalan.jar -in doc.xml -xsl t.xsl
<?xml version="1.0" encoding="UTF-8"?>

<p>Joe Bloggs</p>


(deborah@au-dpickett)[93] /cygdrive/c/temp
$ java -jar c:/Projects/xalan-j_2_7_0/xalan.jar -in doc.xml -xsl t.xsl -ts
Selected source node '#document', at file 'null', line #-1, column #-1
(default root rule) apply-templates, select='null':
     10001: doc
Selected source node 'doc', at file 'null', line #-1, column #-1
(default rule) apply-templates, select='null':
     10003: #text
     10004: person
     10007: #text
<?xml version="1.0" encoding="UTF-8"?>

Selected source node 'person', at file 'null', line #-1, column #-1
file:///c:/temp/t.xsl Line #5, Column #41: value-of, select='@given-name':
     10006: given-name
Selected source node 'person', at file 'null', line #-1, column #-1
file:///c:/temp/t.xsl Line #7, Column #42: value-of, select='@family-name':
     10005: family-name
<p> </p>

When -ts is used, the select for '@given-name' and '@family-name' becomes empty.
Interestingly, tests like @given-name = 'Joe' still work.
Workaround: select='string(@given-name)' produces the expected output.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Mime
View raw message