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

Re: Wellformed?


wellformed
Karl Waclawek wrote:
> From: "Jeff Rafter" <lists@j...>
> 
>>Just a quick sanity check I am tying to work on some conformance and want to
>>make sure I am correct:
>>
>>The following is wellformed:
>>===================
>>
>><!DOCTYPE doc [
>>  <!ENTITY e "<foo bar1:att='att' bar2:att='att'>test</foo>">
>>]>
>><doc xmlns:bar1="http://www.example1.org"
>>     xmlns:bar2="http://www.example2.org">
>>  <child>&e;</child>
>></doc>
> 
> Yes, looks OK.
> 
>>But the following is not:
>>================
>><!DOCTYPE doc [
>>  <!ENTITY e "<foo bar1:att='att' bar2:att='att'>test</foo>">
>>]>
>><doc xmlns:bar1="http://www.example.org"
>>     xmlns:bar2="http://www.example.org">
>>  <child>&e;</child>
>></doc>
> 
> Duplicate attribute - not OK.

This is well-formed WRT XML 1.0 (two different attributes, bar1:att and 
bar2:att). A parser that is not "namespace-aware" certainly shouldn't 
complain about it.

If a parser is "namespace-aware", i.e., checks conformance to Namespaces 
In XML, then the document is in error, as it violates the constraint 
that no tag may have two attributes with "qualified names with the same 
local part and with prefixes which have been bound to namespace names 
that are identical." But this is not a well-formed error. The first 
version of the namespaces recommendation does not use the term 
"well-formed" at all, and while the 1.1 version does, it is not used in 
this context.

Bob Foster
http://xmlbuddy.com/

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.