W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > October 2011

Re: TPAC topic: XInclude @xpointer when parse="text"

From: Norman Walsh <ndw@nwalsh.com>
Date: Sun, 30 Oct 2011 21:24:25 -0700
To: public-xml-core-wg@w3.org
Message-ID: <m2bosxpz46.fsf@nwalsh.com>
"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

Received on Monday, 31 October 2011 04:25:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 31 October 2011 04:25:08 GMT