xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From il...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
Date Tue, 17 Jun 2003 19:29:43 GMT
ilene       2003/06/17 12:29:43

  Modified:    java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
  Log:
  Patch for bugzilla #15828.
  
  Arguments to URIResolver.resolve method for document function, in XSLTC are now
  
  href: argument passed to document function
  base: URI of stylesheet
  
  Revision  Changes    Path
  1.68      +12 -7     xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- TransformerImpl.java	17 Jun 2003 19:26:12 -0000	1.67
  +++ TransformerImpl.java	17 Jun 2003 19:29:43 -0000	1.68
  @@ -426,7 +426,7 @@
       /**
        * Builds an internal DOM from a TrAX Source object
        */
  -    private DOM getDOM(Source source, int mask)
  +    private DOM getDOM(Source source)
   	throws TransformerException {
   	try {
   	    DOM dom = null;
  @@ -442,7 +442,7 @@
                                                         : false;
   	    // Get systemId from source
   	    if (source != null) {
  -		_sourceSystemId = source.getSystemId();
  +		   _sourceSystemId = source.getSystemId();
   	    }
   
   	    if (source instanceof SAXSource) {
  @@ -652,7 +652,7 @@
   		transformIdentity(source, handler);
   	    }
   	    else {
  -		_translet.transform(getDOM(source, 0), handler);
  +		_translet.transform(getDOM(source), handler);
   	    }
   	}
   	catch (TransletException e) {
  @@ -1141,13 +1141,18 @@
        * DOMCache interface. This approach is simple, but removes the
        * possibility of using external document caches with XSLTC.
        *
  -     * @param uri  An URI pointing to the document location
  -     * @param mask Contains a document ID (passed from the translet)
  +     * @param baseURI The URI for the stylesheet
  +     * @param href The href argument passed to the document function.
        * @param translet A reference to the translet requesting the document
        */
  -    public DOM retrieveDocument(String uri, int mask, Translet translet) {
  +    public DOM retrieveDocument(String baseURI, String href, Translet translet) {
   	try {
  -	    return getDOM(_uriResolver.resolve(uri, _sourceSystemId), mask);
  +        
  +        // Argument to document function was: document('');
  +        if (href.length() == 0) {
  +            href = new String(baseURI);
  +        }    
  +	    return getDOM(_uriResolver.resolve(href, baseURI));
   	}
   	catch (TransformerException e) {
   	    if (_errorListener != null)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message