Re: Why XT doesn't use the DOM

Subject: Re: Why XT doesn't use the DOM
From: Tyler Baker <tyler@xxxxxxxxxxx>
Date: Wed, 23 Dec 1998 10:59:48 -0500
Don Park wrote:

> 3. Source information (line and URL)
>
> This is probably worth considering.  Something like:
>
> interface Document2 {
>     attribute url;
> }
>
> interface Node2 {
>     Location getLocation(Node node);
>         // returns node's physical location information using Node
>     ...
> }
>
> interface Location : Node {
>         // node value could be XML attribute list syntax like this:
>         // i.e. "href='foobar.xml' line='123' col='22' pos='23123'"
>         // getAttributes could return NamedNodeMap to attributes
>     DOMString nodeURL;
>     long lineNumber;
>     long lineOffset;
>     long streamOffset;
> }

I really don't like using line numbers for this other than in an editing
environment because if you are programmatically building up a DOM tree, line
numbers do not apply.  However some sort of XPOINTER mechanism for flagging
errors would be great IMHO.  In other words location is defined by an XPointer
rather than a line number relative to the owner document.  I think this sort of
error flagging would be much more useful.

Tyler


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread