[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: How to read Schema XSD in stylesheet XSL!

Subject: RE: How to read Schema XSD in stylesheet XSL!
From: "Scott Trenda" <Scott.Trenda@xxxxxxxx>
Date: Wed, 28 Nov 2007 09:46:00 -0600
RE:  How to read Schema XSD in stylesheet XSL!
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"
xmlns:xsi="xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"">
  <!-- node content -->
</node>

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:  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.
cheers!
_________________________________________________________________
The next generation of MSN Hotmail has arrived - Windows Live Hotmail
http://www.newhotmail.co.uk

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.