sboag       00/12/20 20:21:21

  Modified:    java/src/org/apache/xalan/stree SourceTreeHandler.java
  Log:
  Absolutize the URL for unparsed entity URIs.  From the sped:
  "The root node has a mapping that gives the URI for each unparsed entity 
declared in the document's DTD. The URI is generated from the system identifier 
and public identifier specified in the entity declaration. The XSLT processor 
may use the public identifier to generate a URI for the entity instead of the 
URI specified in the system identifier. If the XSLT processor does not use the 
public identifier to generate the URI, it must use the system identifier; if 
the system identifier is a relative URI, it must be resolved into an absolute 
URI using the URI of the resource containing the entity declaration as the base 
URI [RFC2396]."
  Note that this will cause problems with the testsuite.  We should
  probably try and do something with the public ID to avoid this, both in the
  code and in the test?
  
  Revision  Changes    Path
  1.25      +8 -0      
xml-xalan/java/src/org/apache/xalan/stree/SourceTreeHandler.java
  
  Index: SourceTreeHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/stree/SourceTreeHandler.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- SourceTreeHandler.java    2000/12/15 03:59:06     1.24
  +++ SourceTreeHandler.java    2000/12/21 04:21:21     1.25
  @@ -1054,6 +1054,14 @@
                                     String notationName)
       throws org.xml.sax.SAXException
     {
  +    try
  +    {
  +      systemId = 
org.apache.xml.utils.SystemIDResolver.getAbsoluteURI(systemId, 
m_inputSource.getSystemId());
  +    }
  +    catch(Exception e)
  +    {
  +      throw new org.xml.sax.SAXException(e);
  +    }
       EntityImpl entity = new EntityImpl(name, notationName, publicId, 
systemId);
       m_root.getDoctype().getEntities().setNamedItem(entity);
     }
  
  
  

Reply via email to