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

Re: DTD Files !

Subject: Re: DTD Files !
From: "Raimond Brookman" <nucleon@xxxxxxxxxx>
Date: Tue, 9 May 2000 19:52:24 +0200
do nothing dtd file

Isnt the XML way of restrictive constraint checking called XML-schema's ?
Looks like a waste of effort to try and reinvent the (not totally invented
yet) XML-schema wheel again....


----- Original Message -----
From: "David Carlisle" <davidc@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Tuesday, May 09, 2000 5:47 PM
Subject: Re: DTD Files !

> or are suggesting to test for everything that you want, and if you don't
> get a true test then give an error?

Yes that, exactly.

You can write XSL transforms that do nothing but walk over the input
tree and make error messages about things they find but don't like.
You can write these by hand or schematron will write them for you.

You can make far more specific constraints this way that are expressable
using a DTD, for example you can force that certain elements are non
empty, or only have digits in their content, or force that an attribute
appears on an element or any of its ancestors.

The validation is fully namespace aware so the document can use any
prefixes it likes which is basically impossible with DTD,

If you are writing it yourself you just start with

<xsl:template match="*">
Unknown element <xsl:value-of select="name(.)"/>

which doesn't allow anything, and then you add templates for things you do
want to allow.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
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.