Re: [xslt] BUG: saxon:line-number() fails for external entities



On Wed, Aug 18, 2004 at 09:47:58AM -0400, Steve Cheng wrote:
> The subject says it all really.  I would have posted on the bug database,
> but I also want to ask a related question (later below).
> 
[...]
> Note the "0" in the output.  The SAXON docs (and the code comments)
> explicitly say that the line number is supposed to be that of the
> entity that contains the (context) node.

  that may be fixeable, please register a bug.

> Looking at the code implementing the saxon:line-number(), it seems
> like xmlGetLineNo() is not giving the correct line number --- I don't
> know if it is supposed to, the API docs are somewhat vague in this area.

  the line number being stored in element this should be doable.

> Related question:
> I want to also implement saxon:system-id()  (for stylesheet diagnostics
> to the user).  If I try reading node->doc->URL a similar problem occurs
> with external entities.  Is there a standard way to get the URI of
> the entity of a given node?

  No, to implement XPath semantic, entities are substitued, so
there is no entity node place holder to store such an URI, and unless
I mess up with the tree content (which I'm not tempted to do) then
this is not possible at all with the current code.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]