validating xml and retrieval of xsd

2006-07-17 Thread Paul Tomsic
what's the best way to validate an xml file against an xsd, when you have to retrieve the xsd from the header attribs via http? for instance, if given an xml that contains the "schemaLocation="http://www.example.com/myschema.xsd http://www.example.com/myschema.xsd"; the process would be (a) ret

Re: validating xml and retrieval of xsd

2006-07-25 Thread Paul Tomsic
doesn't seem right to me. thoughts? thanks in advance --- Michael Glavassevich <[EMAIL PROTECTED]> wrote: > Paul Tomsic <[EMAIL PROTECTED]> wrote on 07/17/2006 > 08:40:20 AM: > > > what's the best way to validate an xml file > against an > > xsd, when

Re: validating xml and retrieval of xsd

2006-07-26 Thread Paul Tomsic
ified the schema in place of the > instance document. Try > "java jaxp.SourceValidator -a personal.xsd -i > personal.xml". > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: [EMAIL PROTECTED] > E-mail: [EMAIL PROTECTED] > >

xinclude ?

2006-08-08 Thread Paul Tomsic
i'm trying to set up xinclude support while validating a XML doc against it's XSD. neither the javax.xml.validation.Validator nor the SchemaFactory (in jdk 1.4) support the "http://apache.org/xml/features/xinclude"; i'm validating much like the SourceValidator example that ships w/ xerces. i see

xpath and namespace?

2006-08-16 Thread Paul Tomsic
perhaps this is more of a xalan thing, but i'm hoping someone here might be able to help. i'm querying nodes via xpath XPathAPI.selectSingleNode(Node, String) where the string is the xpath "foo/[EMAIL PROTECTED]'2']/baz" that fails if the node has a default namespace or if the nodes in the xpath

validators.schema.XUtil ?

2006-08-16 Thread Paul Tomsic
am i mistaken, or did there used to be a class in "org.apache.xerces.validators.schema.XUtil" i can't seem to find it in 2.8.0 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

complexType mixed="true" ?

2006-08-16 Thread Paul Tomsic
is it possible to determine that a node is 'complexType' and 'mixed="true"' ? reason i'm asking is, generally the content contained in these nodes contains HTML and i need preserve teh content so alphabetatesting if i were to obtain the text of /foo/bar, then i would want "alphabetates

XPathConstants to class mapper?

2006-08-18 Thread Paul Tomsic
Is there some way to map classes to the XPathConstants to inform javax.xml.xpath.XPath.evaluate() what type of QName to accept? for instance: getFromXPath(String xpath, Node node, Boolean.class) { XPath.evaluate(xpath, node, XPathConstants.BOOLEAN) } ? ---

setting PSVIDocumentImpl as a property?

2006-08-23 Thread Paul Tomsic
in the FAQ for PSVI, there's mention of setting property "http://apache.org/xml/properties/dom/document-class-name " to "org.apache.xerces.dom.PSVIDocumentImpl" where do you set this, like on what object? - To unsubscribe,

Re: setting PSVIDocumentImpl as a property? - nevermind...got it.

2006-08-23 Thread Paul Tomsic
--- Paul Tomsic <[EMAIL PROTECTED]> wrote: > in the FAQ for PSVI, there's mention of setting > property > > > "http://apache.org/xml/properties/dom/document-class-name > " > > to "org.apache.xerces.dom.PSVIDocumentImpl&q

element PSVI can't xpath

2006-08-23 Thread Paul Tomsic
We're in the process of trying to find out if an element is declared as mixedContent="true" Whe set the features and properties on a DOMParser then cast the document -> element -> elementPSVI, we can't seem to get to the node inside the root. so a simple example is helloperson where is set to m

Re: element PSVI can't xpath

2006-08-26 Thread Paul Tomsic
i found my problem on this. it was the usage of the DOMParser versus the DocumentBuilder. thanks --- Paul Tomsic <[EMAIL PROTECTED]> wrote: > We're in the process of trying to find out if an > element is declared as mixedContent="true" > > Whe set the featu

possible to compare a PSVIElementNSImpl and a Node?

2006-09-01 Thread Paul Tomsic
Hi, I'm trying to pre-cache nodes in a document that are of type mixed-content, so i do the checking, and find nodes that are mixed-content and store them in a list. the problem is, though, when i try to compare various nodes that i've retrieved via Xpath against those that are in the list of mi

no such method XMLSchemaLoader.loadGrammar(XMLInputSource) ?

2006-10-03 Thread Paul Tomsic
v.2.8.1, trying to validate schemas on XML files. not sure where to start tracking down this issue? any help appreciated thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

possible bug while validating schemas

2006-10-27 Thread Paul Tomsic
I think i've found a bug in xerces 2.8.1. I've attached a tarball that reproduces the error. The error is "OutOfMemoryError: Java heap space" the situation is an XML file points to a XSD which contains several "included" XSDs. one of those XSD's has a mismatched targetNamespace. While stepping t

Re: possible bug while validating schemas

2006-10-29 Thread Paul Tomsic
1] http://xerces.apache.org/xerces2-j/xml-schema.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] "Paul Tomsic" <[EMAIL PROTECTED]> wrote on 10/27/2006 05:42:36 PM: > I think i've found a bug in xerces 2.8.1.

Re: possible bug while validating schemas

2006-10-30 Thread Paul Tomsic
s2-j/properties.html#security-manager [3] http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/util/SecurityManager.html Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] "Paul Tomsic" <[EMAIL PROTECTED]> wrote on 10/2

external-schemaLocation property

2006-10-30 Thread Paul Tomsic
when setting the "http://apache.org/xml/properties/schema/external-schemaLocation"; property, on the SAXParser, is it possible to have the value of this take something other than the file uri? for instance a dom document ? - To

XMLSerializer running out of memory....

2006-11-02 Thread Paul Tomsic
i'm trying to serialize a DOM document to a String. It seems that there's a limit on the size of the Document that it can serialize before running out memory. Here's the code i'm using to serialize and i'm wondering if there's a better way to do this: Document document = /* this is my dom docum

Re: XMLSerializer running out of memory....

2006-11-02 Thread Paul Tomsic
yes. it's up to 2048 and still blowing up --- [EMAIL PROTECTED] wrote: > Just to get the stupid question out of the way : > Have you tried using the > -Xmx (or equivalent) option on your JVM to increase > the amount of heap > memory it's allowed to use before giving up? > > ___

Re: XMLSerializer running out of memory....

2006-11-02 Thread Paul Tomsic
sorry, "-Xmx2048m" --- Stanimir Stamenkov <[EMAIL PROTECTED]> wrote: > /Paul Tomsic/: > > --- [EMAIL PROTECTED] wrote: > > > >> Have you tried using the > >> -Xmx (or equivalent) option on your JVM to > increase > >> the am

property setting for including xsd's on validation?

2006-11-08 Thread Paul Tomsic
I've written a simple schema validator which works in almost all cases, w/ the exception of when i set the "schemaLocation" on the XML to a schema which "includes" other schemas. If the targetNamespaces don't match all the way down the "included" XSD chain, then it should fail (xmlspy reports it

Node equals() ?

2006-11-13 Thread Paul Tomsic
Is there an example or a preferred way that you could point me to for Node comparisons? I'm currently using the Canonicalization provided for in the xml-security, but that seems like a lot of overhead. Perhaps there's something contained in Xerces that i could use? thanks --

determining mixed-content?

2006-11-13 Thread Paul Tomsic
I'm using a DOMParser to parse a document, then determine which nodes are of type "mixed='true' " The code snippet i'm using is below. The thing that's throwing me off is that everything seems to come back as "content type='mixed' " regardless of whether it's XSD had that mixed attribute set to

Re: Node equals() ?

2006-11-13 Thread Paul Tomsic
ah, whoops. sorry - wrap it and use Node.isEqualsNode() - thanks On 11/13/06, Paul Tomsic <[EMAIL PROTECTED]> wrote: Is there an example or a preferred way that you could point me to for Node comparisons? I'm currently using the Canonicalization provided for in the xml-securit

XPathFactory - failure to create?

2007-01-09 Thread Paul Tomsic
Using v.2.9.0, i'm trying to do the following: XPathFactory factory = XPathFactory.newInstance(); I'm getting the following error, and it looks like i just need to set up a property somewhere. Could someone point me in the right direction, please? thx error: XPathFactory

Re: XPathFactory - failure to create?

2007-01-09 Thread Paul Tomsic
ah, thought i read someone on the xerces site they (xalan/xerces) now shared a common code base. i digress. --- Michael Glavassevich <[EMAIL PROTECTED]> wrote: > Paul Tomsic <[EMAIL PROTECTED]> wrote on 01/09/2007 > 01:27:03 PM: > > > Using v.2.9.0, i&#