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

Re: Obfuscating XML with namespaces

  • From: Richard Tobin <richard@c...>
  • To: xml-dev@l...
  • Date: Mon, 09 Oct 2000 12:34:15 +0100 (BST)

combine xml

Amy Lewis <amyzing@t...> wrote:

>Obfuscated xml.

Apart from the lengthy URIs, not very.

>Tidy refuses to see any errors in it,

There aren't any namespace errors in it.  (There are two syntax errors in
the XML declaration and an unescaped ampersand in one of the URIs.)

>I'm not even quite sure what namespace the
>most internal foo:element and foo:attribute are in (I think that the
>most internal element is in a different namespace than the attribute
>that it contains, but I'd hate to swear to it).

That's never the case.  If an element and one of its attributes have
the same prefix, they must be in the same namespace, since they have
the same namespace bindings in scope.

>What I'd
>like to know, then, is: what is the use case for giving namespace
>declarations scope?

An important reason is to allow you to combine XML documents.  Suppose
you want to include someone else's XML inside one of your elements.
If namespaces weren't scoped, you'd have to check through the included
text and change any prefixes that happened to clash with your own.

You can check namespace correctness with my XML checker:

  http://www.cogsci.ed.ac.uk/~richard/xml-check.html

If you want to check which namespace an element or attribute is in,
get RXP:

  http://www.cogsci.ed.ac.uk/~richard/rxp.html

and use the -N and -b flags, eg

 rxp -Nb foo.xml

-- Richard

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.