[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespace questions
[Ron Bourret] > 1) Can I have multiple prefixes in the same file that point to the > same namespace? The namespace spec doesn't appear to prohibit this. I believe so, but the ramifications of this aren't clear. I don't want to touch this question, really. > 2) How do namespaces and XLinks work together? For example, suppose > I link to the <Foo> element in another file. > > a) If the <Foo> element is prefixed (that is, it is really > <Bar:Foo>) does my pointer need to know this? Yes. Your pointer points to something in a document *instance*, not to a class; so whether it's <Bar:Foo> or <FooBar> or <_>, you just use the GI as given in that document instance. > b) When I get the <Foo> element back as a result of resolving the > link, do I get <Foo> or <Bar:Foo>? And if I get <Bar:Foo>, do I > also get a namespace PI telling me about the Bar prefix? Possibly the hardest thing about XLink is that it *doesn't return anything*; you *don't get anything back*. The pointer points; it doesn't fetch. When you point to <Bar:Foo>, what you have is a pointer to <Bar:Foo>. That's it. Now, if you're writing a program based on top of a parser and an XLink processor, you should probably be able to ask the parser for some information about the thing that the pointer is pointing to, such as its namespace. But that's something *on top of* XLink, not part of it. -Chris -- <!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN"> <!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN" "<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487 <USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek> 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
|