[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Q: Using XML entities for href's
In message <199803021453.PAA28485@s...>, Steffen Rodig <rodig@s...> writes >In my xml based application I want to write xml documents with some >kind of indirect links, since I don't know the exact location of a >link target at the time a document is created and stored into a >repository. I got the idea to use the entity concept of xml for doing >this, since in my understanding entities can be used as virtual >identifiers for physical locations. So at the time I request a >document from the repository I'd like to include some entity >definitions into the internal DTD of a document. Then it would >look like this: > ><?XML VERSION="1.0"?> ><!DOCTYPE CP-Document PUBLIC "-//SDM SHORE//DTD CP-Document//EN" [ ><!ENTITY aRef SYSTEM "http://aServer/aDocument#anElement"> >]> >... ><aTag xml-link=simple href=aRef>content</aTag> There are two possible lines of attack suggested by XML itself (as against XLL, which uses URLs as its targets without the need for an entity declaration as in your example). The PUBLIC identifier (of which you give an example above, in the external entity declaration of your external DTD subset) is intended to be a generic name which is not bound to a physical location. Philosophically, this is exactly what you want. Unfortunately, in XML (unlike SGML) you can't just specify a PUBLIC identifier - you have to give a system identifier as well. (So, in fact, your ><!DOCTYPE CP-Document PUBLIC "-//SDM SHORE//DTD CP-Document//EN" [ is not correct.) Which brings us on to system identifiers, since you have to have one anyway ;-) The finalized XML Recommendation talks of these system identifiers being a 'URI', as against a URL. I remember a few years ago that URIs were going to include URNs (Uniform Resource Names) as well as the URLs we have grown to know and love. URNs are (were?) like public identifiers in not being closely-coupled to a physical storage location. I think that work is being done to update the definition of URIs to provide this kind of flexibility. Richard Light. Richard Light SGML/XML and Museum Information Consultancy richard@l... xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|