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


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Validating stylesheet

[ Lists Home | Date Index | Thread Index ]

At 1/24/03 09:13 AM, Michael Kay wrote:
> > I need to validate XSLT document. How can I do that using
> > either DTD or XML Schema?
>Why would you want to validate an XSLT document using a DTD or XML
>Schema, when you can do the job much more thoroughly with an XSLT

Because XSLT stylesheets are XML documents, some people feel (or are told 
as company policy) that they have to edit them using the company standard 
XML editor. (This was, after all, once considered one of the benefits of 
stylesheets being in XML!) This may be something like Epic, which requires 
the use of a DTD.

Adding the entity declaration

   <!ENTITY % result-elements "">

to the top of the DTD shown in Appendix C of the XSLT Rec 
(http://www.w3.org/TR/xslt#dtd) will work. The result-elements entity is 
there to allow for the use of literal result elements in the stylesheet; if 
you leave it empty, your stylesheet will have to add all new elements using 
the xsl:element instruction.

Bob DuCharme        www.snee.com/bob             <bob@
snee.com>  see http://www.snee.com/bob/xsltquickly for
info on book "XSLT Quickly" from Manning Publications.
(NOTE: bobdc e-mail address used only for mailing
lists; please send private e-mail to bob@)


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

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