Subject: RE: [xsl] Does XSLT support schema validation From: "John Meyer" <jmeyer@xxxxxxxxxxx> Date: Thu, 20 Nov 2003 21:00:30 -0500 |
Sony, 1. There is no direct support for schema validation in XSLT. However the easiest way to integrate validation into the JAXP process is to validate the document during the parsing stage. I know that Xerces 2 (http://xml.apache.org/xerces2-j) is a fully conforming XML Schema processor for Java. 2. This could be quite complex depending on your needs. Extracting data to a string during the transformation can be tricky. Two options are to a) use two transforms, one for the output document <xsl:output ... method="xml"/> and one for the string <xsl:output ... method="text"/>. b) use a java function to extract the data using your processor's extension function mechanism. As for inserting the java variables, the best case would be pass these variables into your transformation as stylesheet parameters. If these variables are dynamic( ie you need the string being extracted in 2 ) you will almost guaranteed have to use an extension function to achieve this. Extension functions are by nature specific to the processor in use. I am not very familiar with extension functions in Java XSLT processors other than Xalan. John -----Original Message----- From: santony@xxxxxxxxxxxxx [mailto:santony@xxxxxxxxxxxxx] Sent: Thursday, November 20, 2003 8:16 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Does XSLT support schema validation I tried google a lot to find answers to these questions. The standards also does not talk about this directly. 1. I have a java application that will be using XSLT, through the Java JAXP classes. We would like to make sure that both the input and output XMLs are in aggreement to 2 respective schemas. Is it possible to do this using XSLT. If possible are there any JAXP interfaces for this mechanism. 2. While doing the above conversion, we would like to extract some values from the input XML to a Java string variable. Similarly we would like to insert some values contained within the Java variables to the produced XML. Is this possible at all. ( I came across this website, where it describes a seemingly simple mechanism to push java data to produced XML. http://www.badgerbytes.co.uk/IE5/default.asp?Page=301 Is this portable. Or is this a xalan specific proprietary functionality ? ) Any help will be appreciated. Thanks --sony XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Does XSLT support schema , Mike Rawlins | Thread | Re: Re: [xsl] Does XSLT support sch, santony |
Re: [xsl] Does XSLT support schema , Mike Rawlins | Date | Re: Re: [xsl] Does XSLT support sch, santony |
Month |