Michael,

Thanks for response. I have gone through all the links which you have provided. 
It looks like that there is no straight way to get the xpath.

If I get the line number during validation error that will be great.

I know that DOM level 2 does not give line number during validation error. 

How can I get the line number when validation error takes place ? 

SAXSource and StreamSource give line number but I want only with DOM. So is 
there any way I can get the line number during validation error ? Does DOM 
level 3 give line number ?

Thanks
Ajay   


--- On Fri, 10/31/08, Michael Glavassevich <[EMAIL PROTECTED]> wrote:

> From: Michael Glavassevich <[EMAIL PROTECTED]>
> Subject: Re: how to xpath when schema validation fails.
> To: [EMAIL PROTECTED]
> Cc: xalan-j-users@xml.apache.org
> Date: Friday, October 31, 2008, 9:34 PM
> Hi Ajay,
> 
> There's no reliable way to do that. This topic has come
> up on the Xerces
> mailing list several times. See one of my responses here
> [1].
> 
> Thanks.
> 
> [1]
> http://marc.info/?l=xerces-j-user&m=107375672210434&w=2
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: [EMAIL PROTECTED]
> E-mail: [EMAIL PROTECTED]
> 
> ajay bhadauria <[EMAIL PROTECTED]> wrote on
> 10/31/2008 11:55:59 AM:
> 
> > Hi,
> >
> > I need help.
> >
> > I am doing xml document validation against schema
> using xalan 2.7.1.
> > I am providing dom to validate API of xalan 2.7.1.
> >
> > So when dcoument validation fails on some element of
> the xml
> > document , how do we construct xpath from root element
> of the
> > document to the element where error occuurred.
> >
> >
> > Thanks a lot.
> >
> > Ajay Bhadauria


      

Reply via email to