xml-xalan-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tjerk Wolterink (JIRA)" <xalan-...@xml.apache.org>
Subject [jira] Created: (XALANJ-2245) <script> element inside <xsl:comment> element results in exception
Date Thu, 08 Dec 2005 19:14:08 GMT
<script> element inside <xsl:comment> element results in exception
------------------------------------------------------------------

         Key: XALANJ-2245
         URL: http://issues.apache.org/jira/browse/XALANJ-2245
     Project: XalanJ2
        Type: Bug
 Environment: nvironment: 
      
        
          2.0fd
          C:\tomcat5.5\bin\bootstrap.jar
          1.1 or higher
          C:\Program Files\Java\jre1.5.0_05\lib\ext
          Xerces-J 2.7.1
          not-present
          Xalan Java 2.7.0
          not-present
          not-present
          1.5.0_05
          2.0
          not-present
          C:\Program Files\Java\jre1.5.0_05\lib\rt.jar;C:\Program Files\Java\jre1.5.0_05\lib\i18n.jar;C:\Program
Files\Java\jre1.5.0_05\lib\sunrsasign.jar;C:\Program Files\Java\jre1.5.0_05\lib\jsse.jar;C:\Program
Files\Java\jre1.5.0_05\lib\jce.jar;C:\Program Files\Java\jre1.5.0_05\lib\charsets.jar;C:\Program
Files\Java\jre1.5.0_05\classes
          2.0
          Xalan Java 2.7.0
    Reporter: Tjerk Wolterink
    Priority: Blocker



I have the following XML in an xsl stylesheet:

<xsl:comment>
	<!-- standard functions script -->
	<script type="text/javascript" src="{$absolute-url}/js/standard.js"/>
	<!-- XMLHttpRequest support in Opera -->
	<script type="text/javascript" src="{$absolute-url}/js/xmlhttprequest.js"/>
	<!-- needed for xmlw3cdom.js -->
	<script type="text/javascript" src="{$absolute-url}/js/xmlsax.js"/>
	<!-- W3C DOM Implementation -->
	<script type="text/javascript" src="{$absolute-url}/js/xmlw3cdom.js"/>
	<!-- XML-RCP Implementation -->
	<script type="text/javascript" src="{$absolute-url}/js/vcXMLRPC.js"/>
	<!-- FCKEditor -->
	<script type="text/javascript" src="{$absolute-url}/js/fck_editor/fckeditor.js"/>
	<!-- XCM Specific -->
	<script type="text/javascript" src="{$absolute-url}/js/xcm.js"/>
	<!-- Site Specific Submenu -->
	<script type="text/javascript" src="{$absolute-url}/js/submenu.js"/>
	</xsl:comment>

When i use Xalan (not XLTC) i get the following message:

; Line#: -1; Column#: -1
javax.xml.transform.TransformerException: script is not allowed in this position in the stylesheet!
	at org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:904)
	at org.apache.xalan.processor.StylesheetHandler.getProcessorFor(StylesheetHandler.java:385)
	at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:617)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:284)
	at org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:150)
	at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:623)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:920)
	at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:774)
	at tjerk.xcm.filters.XslTransformFilter.transform(XslTransformFilter.java:131)

When i do not use the <xsl:comment> everything goes right.

Note that <script is bound to the html namespace in the top of the xsl document:

<xsl:stylesheet version="1.0"
	xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xalan="http://xml.apache.org/xalan">


-- 
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