all groups > dotnet xml > august 2005 >
You're in the

dotnet xml

group:

how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes suc


how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes suc Daniel
8/30/2005 5:01:54 PM
dotnet xml:
how to make sure a xsl document has valid xsl syntax? i tried loading it
into an xml document but that doesnt show syntax errors inside attributes
such as "foo/bar" vs "bar\foo"

Re: how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes Pascal Schmitt
8/31/2005 12:00:00 AM
[quoted text, click to view]

System.XML performs only checks for the well-formedness of Documents,
not for validity. You need a Schema for XSLT wich defines Regular
Expressions to check for "syntax errors inside attributes" (I think you
mean the select-ones and XPath-syntax errors?) and XmlValidatingReader.

An other, easier way is to try to execute the transformation inside a
try-catch-block, if an error occurs, you made errors...
Re: how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes Oleg Tkachenko [MVP]
8/31/2005 10:43:35 AM
[quoted text, click to view]

Load it into an XSLT processor, e.g. XslTransform class. That would run
compilation which always checks syntax and semantics.

--
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
AddThis Social Bookmark Button