RE: [xsl] How to read Schema XSD in stylesheet XSL!

Subject: RE: [xsl] How to read Schema XSD in stylesheet XSL!
From: "Scott Trenda" <Scott.Trenda@xxxxxxxx>
Date: Wed, 28 Nov 2007 09:46:00 -0600
I don't know exactly how you'd go about capturing the validity response,
but I do know that many XSLT processors either perform automatic schema
validation on their input document, or allow the ability to do so via a
parameter to the transformation engine. (And I believe you'd need
Saxon-SA to do this via Saxon; Sir Kay would be a much better resource
on this.)

To trigger the schema validation, you need to use the appropriate XML
Schema Instance (xsi) attributes on your input document:

<node xsi:noNamespaceSchemaLocation="test.xsd"
  <!-- node content -->

If you can't append the schema location to the root node prior to the
transformation, then you'd have to experiment to see if you can get the
same behavior by copying the source document into a variable, adding the
schema location attribute there, and using apply-templates on the
variable node-set.

It's up to you there, but if it's possible to fall back on the XSLT
engine's native schema validation, I'd strongly recommend it. The XML
Schema specification is comparitively huge, and recreating a validation
engine in XSLT would be an enormously complicated task, as the other
list members have said so far. Regardless, good luck with your project,
and be sure to post back to the list with your results if you decide to
try it.

~ Scott

-----Original Message-----
From: wiky [mailto:wiky_83@xxxxxxxxxxx]
Sent: Wednesday, November 28, 2007 5:45 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] How to read Schema XSD in stylesheet XSL!

Thnx for taking time to answer my odd question.
I know its not best thing to preform this task in XSL but thats why this
is a task!
Yes Kamal you can say that I'm not good in XSL as I mentioned in my
first message I'm newbie in XSL.
Yes i dont know how can I access XSD document using XSL?
Any reply will b highly appreciated.
The next generation of MSN Hotmail has arrived - Windows Live Hotmail

Current Thread