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

Re: Default namespace declaration in DTD and MSXML


msxml xmlns
Either way is valid, acceptable, conformant, and non-deprecated.

As you have discovered, the MSXML parser does not tolerate the xmlns 
attribute being defaulted via the DTD. This is either a bug, or a limitation 
of this parser, depending on how charitable you're feeling.

-Wayne Steele


>From: "Wedinger, Keith" <Keith_Wedinger@s...>
>To: "Xml-Dev (xml-dev@l...)" <xml-dev@l...>
>Subject:  Default namespace declaration in DTD and MSXML
>Date: Wed, 21 Nov 2001 13:08:04 -0500
>
>I have the following DTD which declares an xmlns attribute to handle the
>default namespace (the DTD comes from RosettaNet):
>
><!ENTITY % common-attributes "id  CDATA #IMPLIED" >
>
><!ELEMENT Preamble (
>           standardName ,
>           standardVersion ) >
>
><!ATTLIST Preamble xmlns CDATA #FIXED
>           "http://www.rosettanet.org/RNIF/V02.00
><http://www.rosettanet.org/RNIF/V02.00> " >
>
><!ELEMENT standardName
>            ( GlobalAdministeringAuthorityCode ) >
>
><!ELEMENT GlobalAdministeringAuthorityCode
>            ( #PCDATA ) >
>
><!ELEMENT standardVersion
>            ( VersionIdentifier ) >
>
><!ELEMENT VersionIdentifier
>            ( #PCDATA ) >
>
>When I attempt to validate the following XML against the DTD above using 
>the
>MSXML parser, I get an error indicating that a default namespace 
>declaration
>in the DTD is not supported.  When I attempt to validate the XML below 
>using
>.NET, I get, "The 'x' character, hexadecimal value 0x78, cannot be included
>in a name."
>
><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE Preamble SYSTEM "Preamble_MS_V02_00.dtd">
><Preamble>
>    <standardName>
>
><GlobalAdministeringAuthorityCode>RosettaNet</GlobalAdministeringAuthorityCo
>de>
>    </standardName>
>    <standardVersion>
>       <VersionIdentifier>V02.00</VersionIdentifier>
>    </standardVersion>
></Preamble>
>
>To work around this in my code, I change the <Preamble> root element above
>to:
><Preamble xmlns="http://www.rosettanet.org/RNIF/V02.00">
>Then, MSXML is happy.
>
>My question is:  Is the default namepace declaration in the DTD above in
>conjunction with the XML above considered valid?  Or, would the valid form
>be the root element containing the xmlns attribute?
>
>J. Keith Wedinger
>Senior Software Developer
>Sterling Commerce
>keith_wedinger@s...
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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-2011 All Rights Reserved.