XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Extracting Schema from an element instance while parsing.

David <dlee@calldei.com> wrote on 09/14/2010 04:00:13 PM:

>   Thanks.
> After posting this post I did run into PSVIProvider and tried it out.
> Voila ! It worked (probably better then my code !)
> I felt so dumb ....
>
> Except ... it only works while parsing XML not generating it.
> In my use case I need access to the data while generating an XML
> document (from a different source),
> so that I can extract the annotation information *before* generating a
> particular element (it will guide the decision on what to generate).
> But using PSVIProvider, I might be able to do the same thing in 2 passes
> ... not entirely sure yet, still looking.
> Thanks for the suggestion.

Not sure how you're making decisions on what to write, but if you need to know the element declaration before you write the element, you could always keep a ValidatorHandler on the side and push SAX events to it and then retrieve the PSVI.

> There still is a use case (which I dont need yet but I think is useful).
> That is, given a simplified XPath, find the XSD information - Without
> having an instance document.
>
>
>
> David A. Lee
> dlee@calldei.com
> http://www.xmlsh.org


Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com

E-mail: mrglavas@apache.org



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS