Subject: Re: DTD Files ! From: "Raimond Brookman" <nucleon@xxxxxxxxxx> Date: Tue, 9 May 2000 19:52:24 +0200 |
Err... 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.... Grtz, Raimond ----- 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="*"> <xsl:message> Unknown element <xsl:value-of select="name(.)"/> </xsl:message> </xsl:template> which doesn't allow anything, and then you add templates for things you do want to allow. David 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: DTD Files !, Wendell Piez | Thread | RE: DTD Files !, Medina, Edward |
Re: Special characters in xsl, David Carlisle | Date | What's!with!the!puctuation!, regan |
Month |