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/05/18 04:07:32 UTC

[Bug 1803] New - Xalan-J doesn't handle xsl:version on parent literal element

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

*** shadow/1803	Thu May 17 19:07:32 2001
--- shadow/1803.tmp.24773	Thu May 17 19:07:32 2001
***************
*** 0 ****
--- 1,67 ----
+ +============================================================================+
+ | Xalan-J doesn't handle xsl:version on parent literal element               |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1803                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.1                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority:                           Component: Xalan                   |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xalan-dev@xml.apache.org                                     |
+ |  Reported By: spage@macromedia.com                                         |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ As I understand http://www.w3.org/TR/xslt?#forwards , I should be able to 
+ mention novel xsl elements unknown to Xalan-J if their parent literal result 
+ element specifies xsl:version 1.1.  Xalan-J should ignore the element and 
+ invoke the xsl:fallback for it.
+ 
+ However, it doesn't work.  Xalan-J complains about xsl:document even when nested 
+ inside a tag that specifies xsl:version 1.1.  (Yes I am aware that 1.1 isn't 
+ shipping yet.)
+ 
+ - - - - run the following against any xml document - - - - 
+ 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+     Write something out in main document.
+     <!--
+         Wrap the xsl:document reference in a literal element that
+         mentions xsl:version 1.1, otherwise 1.0 XSL processors
+         complain about it.
+     -->
+     <a href ="preface.html" xsl:version="1.1">
+         <!-- xalan-J doesn't like xsl:document, despite xsl:version in enclosing 
+ a tag. -->
+         <xsl:document href="preface.html"
+             xsl:version="1.1"
+         >
+             We are in xsl:document.
+             <xsl:fallback>
+                 Fallback in case xsl:document doesn't work.
+             </xsl:fallback> 
+         </xsl:document>
+     </a>
+ </xsl:template>
+ </xsl:stylesheet>
+ 
+ <!--
+     BUG: 
+     Even with xsl:version="1.1" on the enclosing element,
+     Xalan-J 2.0.1 complains:
+     file:///xml_format/tests/bugs/xsl_document.xsl; Line 14; Column 4; 
+     XSLT Error (javax.xml.transform.TransformerConfigurationException):
+     xsl:document is not allowed in this position in the stylesheet!
+ 
+ 
+     But if I put version="1.1" on the stylesheet tag,
+     Xalan-J 2.0.1 runs through the xsl:document tag,
+     even though it doesn't implement it,
+     and doesn't trigger the xsl:fallback.
+ 
+     Same code works in InstantSaxon 6.0.2, haven't tried xt yet.
+ -->