Ajay,

I saw the response from Michael Glavassevich to your problem. As usual he pointed to the real problem. Forget the validationHandler and see the mail from Michael.

regards,
Dick
Op 13-sep-2009, om 22:36 heeft ajay bhadauria het volgende geschreven:

Hi Dick,

Thanks a lot for response. Thanks also for given example to get the PSVI from dbf.

I need to use Validator so in the attached file, I created validator object obtained from schema object. Could you please guide me how should I create seperate validator object ?. I am not aware of validationHandler class. Could you please also tell me how I can do that ?

Regards
Ajay

--- On Sun, 9/13/09, Dick Deneer <dick.den...@donkeydevelopment.com> wrote:

From: Dick Deneer <dick.den...@donkeydevelopment.com>
Subject: Re: Missing PSVI after Validation.
To: j-users@xerces.apache.org
Date: Sunday, September 13, 2009, 4:25 PM
Without a  separate validator you
can just use:
                DocumentBuilderFactory dbf
= DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true); dbf.setValidating(true); dbf.setAttribute("http://apache.org/xml/features/validation/ schema", Boolean.TRUE); dbf.setAttribute( "http://apache.org/xml/properties/dom/ document-class-name", "org.apache.xerces.dom.PSVIDocumentImpl");
                DocumentBuilder docBuilder
= dbf.newDocumentBuilder();             Document doc =
docBuilder.parse("data/personal.xml");                Element documentElement =
doc.getDocumentElement();               if
(documentElement.isSupported("psvi",
"1.0"))               {                       ElementPSVI psviElem =
(ElementPSVI) doc.getDocumentElement();                 XSModel model =
psviElem.getSchemaInformation();                        XSElementDeclaration 
decl =
psviElem.getElementDeclaration(); System.out.println(decl.getName ()); }
Without a
separate JAXP validator I am not sure, but I think you have
to use a validitionHandler,

RegardsDick
Deneer
Op 13-sep-2009, om 12:03
heeft ajay bhadauria het volgende geschreven:
Hi
all,
Can
anyone point out in the attached file what I am missing
because of which I am not getting PSVI info. after
validation ?
Thanks
 AB.
---
On Sat, 9/12/09, ajay bhadauria <abhadau...@yahoo.com>
wrote:
 From:
ajay bhadauria <abhadau...@yahoo.com>Subject:
Missing PSVI after Validation.To:
j-us...@xerces.apache.orgdate:
Saturday, September 12, 2009, 4:21 PMHi
all,
I
am trying to get PSVI info after JAXP validation of
xmlinstance
with schema but I am not getting PSVI info. Itlooks
like I am missing very basic thing.
I
provided DOMSource and DOMResult to the JAXP
validator(validate(DOMSource,DOMResult).
Both these sources arecreated
from the DocumentBuilderFactory which hasattribute (org.apache.xerces.dom.PSVIDocumentImpl")
.
Please
find the attached file if someone can pinpoint
whatI
am missing that will great help for me.
ThanksAb


--------------------------------------------------------------------- To
unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.orgfor
additional commands, e-mail: j-users-h...@xerces.apache.org




--------------------------------------------------------------------- To
unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.orgfor
additional commands, e-mail: j-users-h...@xerces.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org


Reply via email to