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/03/29 21:47:26 UTC
[Bug 1152] New - In xml is included using document() function, the white space is not being stripped despit
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1152
*** shadow/1152 Thu Mar 29 11:47:26 2001
--- shadow/1152.tmp.10217 Thu Mar 29 11:47:26 2001
***************
*** 0 ****
--- 1,56 ----
+ +============================================================================+
+ | In xml is included using document() function, the white space is not being |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1152 Product: XalanJ2 |
+ | Status: NEW Version: 2.0.1 |
+ | Resolution: Platform: PC |
+ | Severity: Normal OS/Version: Other |
+ | Priority: Low Component: Xalan |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xalan-dev@xml.apache.org |
+ | Reported By: nick_sushkin@scientist.com |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ Test stylesheet (inc.xsl):
+
+ <?xml version = "1.0" encoding = "UTF-8"?>
+ <xsl:stylesheet version = "1.0" xmlns:xsl
+ = "http://www.w3.org/1999/XSL/Transform">
+ <xsl:strip-space elements="nospace a b c"/>
+ <xsl:template match="/">
+ <nospace>
+ <xsl:copy-of select="document('a.xml')"/>
+ </nospace>
+ </xsl:template>
+ </xsl:stylesheet>
+
+ Included xml file a.xml:
+
+ <a>
+ <b>
+ <c>
+ </c>
+ </b>
+ </a>
+
+ Current erroneous result output:
+ > java org.apache.xalan.xslt.Process -XSL inc.xsl
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <nospace><a>
+ <b>
+ <c>
+ </c>
+ </b>
+ </a></nospace>
+
+
+ The output should have white space stripped from elements nospace, a, b, and c
+ because they were declared in <xsl:strip-space elements="nospace a b c"/>. That
+ is the correct output should be
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <nospace><a><b><c/></b></a></nospace>