OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Canonicalizer that uses XML Schemas (rather than DTDs)?

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

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








 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS