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

Canonicalizer that uses XML Schemas (rather than DTDs)?

  • To: <xml-dev@l...>
  • Subject: Canonicalizer that uses XML Schemas (rather than DTDs)?
  • From: "Roger L. Costello" <costello@m...>
  • Date: Mon, 22 Nov 2004 14:48:11 -0500
  • Thread-index: AcTQzDKc9aNjKtKISfuUw/XhNEWZgg==

canonicalizer
Hi Folks,

This seems to be the approach taken to canonicalize:

   {XML, DTD} --------------> Canonical XML
               canonicalizer

That is, a canonicalizer tool will take an XML document,
along with a DTD and convert the XML into a standard form.

Is there any work on creating a canonical form that uses
XML Schemas instead of DTDs, i.e., 

   {XML, XML Schema} --------------> Canonical XML
                      canonicalizer

Why would it matter that a canonicalizer tool utilize an
XML Schema rather than a DTD?  Where would it make a difference?

Here is one place where it would make a difference:

DTD's allow you to provide a default value for an attribute, e.g.,

   <!ATTLIST speed units CDATA "knots">

If an XML instance document does not specify a value for 
the attribute ...

   <speed>160</speed>

... a canonicalizer tool will insert the default value into the 
XML instance:

   <speed units="knots">160</speed>

Now suppose that XML Schemas is being used for canonicalizing 
rather than DTDs.  

Schemas enables you to specify default values for attributes.  
But schemas also enables you to specify default values for 
elements, e.g.,

    <element name="currency" type="string" default="USD"/>

Then in the XML instance document, if we wished to use the default value,
we could simply write:

   <currency/>

If a canonicalizer tool was using XML Schemas I would expect it to 
fill in the default value for the element (just like it does for 
attributes):

   <currency>USD</currency>

Questions: 

1. Is there a canonicalizer which uses XML Schemas instead of DTDs?

2. Can you think of other differences that would occur if XML Schemas
   were used by a canonicalizer rather than DTDs?

/Roger





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.