Hi again,

I am just asking questions to help my understanding, which is shaky.

[more comments inline]

> -----Original Message-----
> From: David N Bertoni/Cambridge/IBM [mailto:david_n_bertoni@;us.ibm.com]
> Sent: Thursday, October 17, 2002 2:16 PM
>
> "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?

I would think it would get confused with resolving XML 'entities' which happened
to me.


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

But what if I have my base XSL at /blah/my.xsl

will it find /foo/poo/test.xml?


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

OK.

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

it seems like it would lead to confusion, especially on a shared list.

thanks for your explanations,
-Rob

>
> Dave
>


Reply via email to