You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2003/09/04 13:54:03 UTC

cvs commit: cocoon-2.1/src/blocks/woody/samples/flow binding_example.js

cziegeler    2003/09/04 04:54:03

  Modified:    src/blocks/woody/samples/flow binding_example.js
  Log:
  Now any protocol can be used as the documentURI
  
  Revision  Changes    Path
  1.8       +3 -1      cocoon-2.1/src/blocks/woody/samples/flow/binding_example.js
  
  Index: binding_example.js
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/flow/binding_example.js,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- binding_example.js	24 Jul 2003 12:41:20 -0000	1.7
  +++ binding_example.js	4 Sep 2003 11:54:03 -0000	1.8
  @@ -150,7 +150,9 @@
           parser = cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
           resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
           source = resolver.resolveURI(uri);
  -        return parser.parseDocument(new Packages.org.xml.sax.InputSource(source.getURI()));
  +        var is = new Packages.org.xml.sax.InputSource(source.getInputStream());
  +        is.setSystemId(source.getURI());
  +        return parser.parseDocument(is);
       } finally {
           if (source != null)
               resolver.release(source);