[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: So maybe ID isn't a problem after all.


replaceme
--- Bob Hutchison <hutch@x...> wrote:
> On 01/11/13 10:48 AM, "Jim Ancona" <scarhill@y...> 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 

<myElement ref="myid"/>

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."[1]

> 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
> URNs? 

XPointer defines the syntax for the fragment identifier part of a URI 
Reference[2]. Since URIs include both URLs and URNs[3], I would expect the
answer to be "yes". Comments from those more knowledgable are welcome.

Jim

[1] - http://www.w3.org/TR/xinclude/#intro
[2] - http://www.w3.org/TR/xptr/#N686
[3] - http://www.ietf.org/rfc/rfc2396.txt - Section 1.2


=====
Jim Ancona
jim@a...                     jancona@x...

__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.