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/09/07 21:43:23 UTC

[DO NOT REPLY: Bug 3506] New: xsltc fails conf test select73 entity splits text node

PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

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

*** shadow/3506	Fri Sep  7 12:43:23 2001
--- shadow/3506.tmp.396	Fri Sep  7 12:43:23 2001
***************
*** 0 ****
--- 1,93 ----
+ +============================================================================+
+ | xsltc fails conf test select73 entity splits text node                     |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 3506                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.0                   |
+ |   Resolution:                            Platform: Sun                     |
+ |     Severity: Normal                   OS/Version: Solaris                 |
+ |     Priority: Other                     Component: org.apache.xalan.xsltc  |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xalan-dev@xml.apache.org                                     |
+ |  Reported By: tamiro@east.sun.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ select73 test that an entity does not cause splitting of one text node into 
+ many. It appears that most (but maybe not all) of the difference in the 
+ expected output versus obtained output is due to such splitting.
+ 
+ Expected Output for select73
+ ----------------------------
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <out>
+ <e>1. adresse1 </e><e>2. AFTER</e>
+ <e>1. ad�resse2 </e><e>2. after</e>
+ <e>1. adresse3 </e>
+ <e>1. BEFORE </e><e>2. adresse4</e>
+ <e>1. before </e><e>2. ad�resse5</e></out>
+ 
+ 
+ Obtained Output on select73
+ ---------------------------
+ <?xml version="1.0" encoding="ISO-8859-1" ?>
+ <out>
+ <e>1. adresse1 </e><e>2. AFTER</e>
+ <e>1. ad</e><e>2. �</e><e>3. resse2 </e><e>4. after</e>
+ <e>1. adresse3 </e>
+ <e>1. BEFORE </e><e>2. adresse4</e>
+ <e>1. before </e><e>2. ad</e><e>3. �</e><e>4. resse5</e></out>
+ 
+ select73.xsl
+ ------------
+ <?xml version="1.0"?>
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ 
+   <!-- FileName: select73 -->
+   <!-- Document: http://www.w3.org/TR/xpath -->
+   <!-- DocVersion: 19991116 -->
+   <!-- Section: 2.3 -->
+   <!-- Creator: David Marston -->
+   <!-- Purpose: Test that entity does not cause splitting of one text node into
+ many. -->
+ 
+ <xsl:output method="xml" encoding="ISO-8859-1"/>
+ <!-- With this output encoding, should get one byte of xE9 for the &eacute -->
+ 
+ <xsl:template match="doc">
+   <out>
+     <xsl:apply-templates select="A"/>
+   </out>
+ </xsl:template>
+ 
+ <xsl:template match="A">
+   <xsl:text>
+ </xsl:text>
+   <xsl:for-each select="child::node()">
+     <e>
+       <xsl:value-of select="position()"/><xsl:text>. </xsl:text><xsl:value-of
+ select="."/>
+     </e>
+   </xsl:for-each>
+ </xsl:template>
+ 
+ </xsl:stylesheet>
+ 
+ select73.xml
+ ------------
+ <?xml version="1.0"?>  
+ <!DOCTYPE doc
+ [  
+ <!ELEMENT doc ANY>
+ <!ELEMENT A ANY>
+ <!ELEMENT K ANY>
+ <!ENTITY eacute "&#233;">
+ ]>
+ <doc>
+   <A>adresse1 <K>AFTER</K></A>
+   <A>ad&eacute;resse2 <K>after</K></A>
+   <A>adresse3 </A>
+   <A><K>BEFORE </K>adresse4</A>
+   <A><K>before </K>ad&eacute;resse5</A>
+ </doc>