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

Re: Namespace questions

  • From: Chris Maden <crism@o...>
  • To: xml-dev@i...
  • Date: Thu, 2 Jul 1998 11:12:48 -0400 (EDT)

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!

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.