cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Lundquist (JIRA)" <j...@apache.org>
Subject [jira] Created: (COCOON-1907) Entity resolution in imported XSLT stylesheets does not use catalog
Date Mon, 04 Sep 2006 22:49:24 GMT
Entity resolution in imported XSLT stylesheets does not use catalog
-------------------------------------------------------------------

                 Key: COCOON-1907
                 URL: http://issues.apache.org/jira/browse/COCOON-1907
             Project: Cocoon
          Issue Type: Bug
          Components: * Cocoon Core
    Affects Versions: 2.1.9
            Reporter: Mark Lundquist


I have a stylesheet A.xslt containing 

    <xsl:import href="B.xslt"/>

B.xslt, in turn, has a DTD with external entities defined:

<!DOCTYPE stylesheet
[
 <!ENTITY % HTMLlat1 PUBLIC
   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
 %HTMLlat1;
 <!ENTITY % HTMLspecial PUBLIC
    "-//W3C//ENTITIES Special for XHTML//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
  %HTMLspecial;
]>

In Cocoon running a machine that is disconnected from the Internet, an exception is thrown:

java.net.UnknownHostException: www.w3.org
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
        at java.net.Socket.connect(Socket.java:452)
        at java.net.Socket.connect(Socket.java:402)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:320)
        at sun.net.www.http.HttpClient.New(HttpClient.java:315)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
        at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.startPE(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown Source)
        at org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDInternalSubset(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.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.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
        at org.apache.excalibur.xmlizer.DefaultXMLizer.toSAX(DefaultXMLizer.java:128)
        at org.apache.cocoon.components.xslt.TraxProcessor.sourceToSAX(TraxProcessor.java:301)
        at org.apache.cocoon.components.xslt.TraxProcessor.getTransformerHandlerAndValidity(TraxProcessor.java:239)
        at org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:330)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:397)
....

If the external entities are defined in A.xslt, the exception is not thrown, and the entities
are resolved correctly using the catalog.

This is using the default resolver configuration, and it happens with both Xalan and Saxon.
 I actually first noticed this bug in a Cocoon 2.1.6 application, but never characterized
and reported it until now.


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

        

Mime
View raw message