[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xml-dev] So maybe ID isn't a problem after all.
--- Bob Hutchison <firstname.lastname@example.org> wrote:
> On 01/11/13 10:48 AM, "Jim Ancona" <email@example.com> wrote:
> > What about XPointer?
I probably should have said "What about XLink?", since XPointer specifies the
form of fragment identifiers, while XLink specifies how to use them in XML
documents. For example, as I understand it (which is probably none too well)
<myElement xlink:type="simple" xlink:href="#myid"/>
would be roughly equivalent to
where attribute ref is of type IDREF. The advantage being that the XLink
version can also be
<myElement xlink:type="simple" xlink:href="someOtherDocument.xml#yourid"/>
I think you need an extended XLink to get the equivalent of IDREFS and thus
allow the representation of directed graphs.
> XPointer still works through attributes, right? So you get things like
> <replaceMe ref="..."/>. How does an application know, from XML syntax alone
> that, the element should be replaced by what it is referring to? (I could be
> more precise here I suppose: how is the application supposed to know that
> the <replaceMe> element is identical to what it is referring to -- is that
> English?) I thing that describing something as 'application independent'
> (here) requires the existence of XML syntax that equates <replaceMe> with
> what it is referring to.
This sounds more like XInclude:
"Many programming languages provide an inclusion mechanism to facilitate
modularity. Markup languages also often have need of such a mechanism. This
proposal introduces a generic mechanism for merging XML documents (as
represented by their information sets) for use by applications that need such a
facility. The syntax leverages existing XML constructs - elements, attributes,
and URI references."
> Now, given that the application knows about graphing then using a URI to
> specify the reference is certainly workable in many cases, I would imagine.
> But this is getting pretty close to assuming a URL. In the project I was
> referring to, a URL wouldn't work because the object wasn't locatable that
> way. It was nameable (gosh) and so a URN would work. Do XPointers work with
XPointer defines the syntax for the fragment identifier part of a URI
Reference. Since URIs include both URLs and URNs, I would expect the
answer to be "yes". Comments from those more knowledgable are welcome.
 - http://www.w3.org/TR/xinclude/#intro
 - http://www.w3.org/TR/xptr/#N686
 - http://www.ietf.org/rfc/rfc2396.txt - Section 1.2
Do You Yahoo!?
Find the one for you at Yahoo! Personals