"Grosso, Paul" <pgrosso@ptc.com> writes:
> Norm also suggested that someone should try to register a text()
> XPointer scheme that implements RFC 5147.
I talked myself out of that on the basis that it's clearly in
violation of the spec. I'd try to register it and we'd get asked what
to do and have to tell the punter they couldn't have it.
> Paul and Liam note that one can use the xpath() scheme to address
> first a particular node and then (via, e.g., the xpath substring
> function) particular characters within that node. Paul thinks
> that is more useful in most cases than the 5147 fragment identifier
> that just treats the entire file as a big text node (though this
> doesn't give you access to "lines" like 5147 does).
The whole point of using 5147 is to be able to use lines. Consider
this example from a recent presentation I gave:
<xi:include href="pubdoc.xsd" parse="text" xpointer="text(line=12,19;length=1859)"/>
That allowed me to pick out a single declaration from a whole,
actually real validating schema, and display it. The length integrity
check even assures me that if I edit the schema, I won't simply get
silent failures from the XPointer.
That's completely invalid at the moment, but tremendously useful.
Be seeing you,
norm
--
Norman Walsh
Lead Engineer
MarkLogic Corporation
Phone: +1 413 624 6676
www.marklogic.com