"Robert Koberg" <[EMAIL PROTECTED]> wrote:
> - is it a good idea to do use the EntityResolver to resolve URI's?
SAX uses EntityResolvers to resolve external entities rererred to by system
IDs (URLs).  Can't a document parsed by the document() function be
considered an external entity?

> - does it handle "document('test.xml', '/foo/poo')"?

Xalan already resolves the above to '/foo/test.xml' before calling the
EntityResolver, so I don't see that it's a problem.

> - if this gets resolved in the xml parser, what is the result? Is the XML
put
> into the stylesheet before the transform?

I'm not sure I understand the question.  When the document() function is
called, Xalan-C's run-time uses Xerces-C to parse the document from the
InputSource returned by the EntityResolver.  Since the values of the
arguments to the document() function cannot be determined statically,
there's no way to do this before the transformation begins.  I don't see
this being very different from the way Xalan-J works, except that Xalan-J
uses a URIResolver.

You might argue that, semantically speaking, using an EntityResolver for
this seems strange.  I haven't really thought much about it, but it seemed
reasonable at the time, so I applied the patch.

Dave

Reply via email to