You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by ka...@wipro.com on 2007/12/19 08:19:14 UTC

Schema Validation With XSD

Hi,
Does any version of Xalan support Schema Validation of XML file?
 
Thanks in advance,
Karuna



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: Schema Validation With XSD

Posted by David Bertoni <db...@apache.org>.
karuna.kosaraju@wipro.com wrote:
> 
> Hi mukul,
>  
> Thanks a lot for the reply. Right now, our project just uses xml and xsd's. So we use xerces-c for validation.
>  
> Soon we will be including xslt's to our current package and thus will be needing Xalan for transformations.
>  
> So, we wanted to know whether any class or API provided by Xalan supports xsd validation.

If you enable validation for source tree parsing through Xalan-C's APIs, 
and your document contains schema location hints, then Xerces-C will 
attempt to validate using those hints.  You can try this out with the 
command line Xalan executable using the -v switch.

Some of the fancier features of Xerces-C validation, like pre-loading 
grammars is not support.  However, it's possible to work around this by 
writing a bit more code.

BTW, this sort of question is best asked on the Xalan-C users list, not on 
the developer list.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: FW: Schema Validation With XSD

Posted by ka...@wipro.com.
> Xalan does have Xerces embedded in it.
[Karuna] Does this mean that xerces embedded xalan can be used for xsd validation? 
 
I have built both Xerces and Xalan on Linux. Xerces library was around 2 MB and Xalan library was around 5 MB. I may not be able to put both these libraries on my target due to size constraint. As you said, since xerces is embedded in xalan, can i just use libxalan.so alone to perform my xsd validation and Xslt transformation? For Xsd validation, i will use xerces sax apis and i hope i will not get "undefined reference error" as libxalan.so must be having the xerces reference.

 
Regards,
Karuna

________________________________

From: Mukul Gandhi [mailto:gandhi.mukul@gmail.com]
Sent: Wed 12/19/2007 7:00 PM
To: Karuna Kosaraju (WT01 - TES-Transport Infrastructure)
Cc: xalan-dev@xml.apache.org
Subject: Re: FW: Schema Validation With XSD



On Dec 19, 2007 6:44 PM,  <ka...@wipro.com> wrote:
> So, we wanted to know whether any class or API provided by Xalan supports
> xsd validation.

Xalan doesn't have any facility at XSLT level to do XSD validation
(since it is a XSLT 1.0 processor).

If you want to do XSLT transformations with Xalan, and prior or post
transformation you want to do XSD validation on the XML stream, you
can use Xerces for that (which has APIs to support this). Xalan does
have Xerces embedded in it.

> Since Xalan internally uses Xerces, shouldn't xsd validation also be
> supported from Xalan? Correct me if i am wrong.

As written above by me, Xalan doesn't have XSD validation facility at
XSLT level. It uses a XML parser (Xerces), with which you can do XML
validation.


--
Regards,
Mukul Gandhi





The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

Re: FW: Schema Validation With XSD

Posted by Mukul Gandhi <ga...@gmail.com>.
On Dec 19, 2007 6:44 PM,  <ka...@wipro.com> wrote:
> So, we wanted to know whether any class or API provided by Xalan supports
> xsd validation.

Xalan doesn't have any facility at XSLT level to do XSD validation
(since it is a XSLT 1.0 processor).

If you want to do XSLT transformations with Xalan, and prior or post
transformation you want to do XSD validation on the XML stream, you
can use Xerces for that (which has APIs to support this). Xalan does
have Xerces embedded in it.

> Since Xalan internally uses Xerces, shouldn't xsd validation also be
> supported from Xalan? Correct me if i am wrong.

As written above by me, Xalan doesn't have XSD validation facility at
XSLT level. It uses a XML parser (Xerces), with which you can do XML
validation.


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


RE: Schema Validation With XSD

Posted by ka...@wipro.com.
Hi mukul,
 
Thanks a lot for the reply. Right now, our project just uses xml and xsd's. So we use xerces-c for validation.
 
Soon we will be including xslt's to our current package and thus will be needing Xalan for transformations.
 
So, we wanted to know whether any class or API provided by Xalan supports xsd validation.
 
Since Xalan internally uses Xerces, shouldn't xsd validation also be supported from Xalan? Correct me if i am wrong.
 
Regards,
Karuna

________________________________

From: Mukul Gandhi [mailto:gandhi.mukul@gmail.com]
Sent: Wed 12/19/2007 6:17 PM
To: xalan-dev@xml.apache.org
Subject: Re: Schema Validation With XSD



Xalan is an XSLT processor (1.0 compliant at the moment). The XML
input supplied to Xalan is handled by the XML parser, which is a
separate component. The XML parser used by Xalan is Xerces. Xerces
does have capability to do XSD Schema validation.

The new XSLT version, 2.0 has integrated the Schema validation with
XSLT stylesheets. We can validate input, output and temporary trees
with a Schema aware XSLT 2.0 processor.
But unfortunately, Xalan is presently not 2.0 compliant.

On Dec 19, 2007 12:49 PM,  <ka...@wipro.com> wrote:
>
> Hi,
> Does any version of Xalan support Schema Validation of XML file?
>
> Thanks in advance,
> Karuna


--
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org




Re: Schema Validation With XSD

Posted by Mukul Gandhi <ga...@gmail.com>.
Xalan is an XSLT processor (1.0 compliant at the moment). The XML
input supplied to Xalan is handled by the XML parser, which is a
separate component. The XML parser used by Xalan is Xerces. Xerces
does have capability to do XSD Schema validation.

The new XSLT version, 2.0 has integrated the Schema validation with
XSLT stylesheets. We can validate input, output and temporary trees
with a Schema aware XSLT 2.0 processor.
But unfortunately, Xalan is presently not 2.0 compliant.

On Dec 19, 2007 12:49 PM,  <ka...@wipro.com> wrote:
>
> Hi,
> Does any version of Xalan support Schema Validation of XML file?
>
> Thanks in advance,
> Karuna


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org