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

RE: a namespace definitions related question(s)

  • From: "Shlomo Yona" <S.Yona@F...>
  • To: "Pete Cordell" <petexmldev@t...>
  • Date: Tue, 20 Feb 2007 11:02:29 -0800

RE:  a namespace definitions related question(s)
Thanks for correcting my example with attributes.

Bottom line: the XML instance contains an error.

Thanks.

Shlomo.

-----Original Message-----
From: Pete Cordell [mailto:petexmldev@t...] 
Sent: â 20 ôáøåàø 2007 19:46
To: Shlomo Yona
Cc: xml-dev@l...
Subject: Re:  a namespace definitions related question(s)

Original Message From: "Shlomo Yona"

> If my XML processor is not only parsing but also validating and namespace
> aware, it seems natural to expect it to allow/tolerate examples such as
> the one I gave.

There's a lot of 'if's there :-)

Conceptually parsing of an XML file will happen in (software) layers.

In the first layer the various start tags, end tags, attributes and so on 
will be read and checked for well formedness.  In particular, end tags will 
be matched to their start tags using a basic text match operation.

At the next layer the namespace information will be extracted, and the data 
model updated accordingly.

After that, if appropriate and available, validation will be assessed 
according to any specified schema.

> What I'm asking is, is there a downside to "semantically" matching
> start/end tags by using namespace information?

The current situation is that most (if not all) parsers will not be able to 
read your XML, and I doubt this will change.

> Another questions is: what happens with attributes:
>
> <foo:bar xmlns:foo="foobar" foo:a="b" a="c"/>
>
> Is there a "collision" between foo:a and a?

foo:a and a are completely different attributes.  This is really what 
namespaces enable.

Conversely, in:

<foo:bar xmlns:foo="foobar" xmlns:bar="foobar" foo:a="b" bar:a="c"/>

foo:a and bar:a would be the same attribute and this should be reported as 
an error.

HTH,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
http://www.tech-know-ware.com/lmx
(or http://www.xml2cpp.com)
=============================================




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.