Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Validation of xml file against DTD (http://www.velocityreviews.com/forums/t496109-validation-of-xml-file-against-dtd.html)

Pathik 04-03-2007 10:20 AM

Validation of xml file against DTD
 
Hi All,

currently I am developing one tool, in which i am converting input xml
file to output xml file using
xslt and xalan.

When output xml file is generated i have to validate it against its
dtd document.

How can i do that in xalan? Any suggestions please..

Thanks and Regards,
Pathik


Philippe Poulard 04-03-2007 12:07 PM

Re: Validation of xml file against DTD
 
Pathik wrote:
> Hi All,
>
> currently I am developing one tool, in which i am converting input xml
> file to output xml file using
> xslt and xalan.
>
> When output xml file is generated i have to validate it against its
> dtd document.
>
> How can i do that in xalan? Any suggestions please..
>
> Thanks and Regards,
> Pathik
>


hi,

xalan won't validate your output ; you have to specify in xslt the
doctype on the output and pipe it to a validating parser
<xsl:output
method="xml|html|text|name"
version="string"
encoding="string"
omit-xml-declaration="yes|no"
standalone="yes|no"
*doctype-public="string"*
*doctype-system="string"*
cdata-section-elements="namelist"
indent="yes|no"
media-type="string"/>

xslt2 has features about validating the result output, but it works on
W3C xml schemas

--
Cordialement,

///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
-----------------------------
http://reflex.gforge.inria.fr/
Have the RefleX !


All times are GMT. The time now is 05:43 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.