Chained schemas loaded via array of inputstream not supported?

2006-10-30 Thread Simon Vogensen
HiIm using Xerces 2.8.0.Because of compatibility issues I need to validate my xml by schemas via DocumentBuilder.parse()My root schema imports other schemas in multiple levels.2 of the schemas import each other, so there is a circular dependency between them. My problem is this: how do I load these

Re: Chained schemas loaded via array of inputstream not supported?

2006-10-30 Thread Stanimir Stamenkov
/Simon Vogensen/: My problem is this: how do I load these schemas from jar resources? I guess because the jar: URIs are opaque [1], relative resources can't be resolved automatically so you would need to assign a custom entity resolver to handle those. [1]

Re: Chained schemas loaded via array of inputstream not supported?

2006-10-30 Thread Simon Vogensen
Fantastic! Thanks for the quick answer..I just implemented the following EntityResolver, and that fixed my problem..            EntityResolver entityresolver = new EntityResolver() {                public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {

Re: possible bug while validating schemas

2006-10-30 Thread Paul Tomsic
okay, just for a sanity check on this, would something like this seem to be the appropriate use of the SecurityManager to fulfill my needs of not running out of memory? SAXParser parser = new SAXParser(); parser.setFeature("http://xml.org/sax/features/validation";, true); parser

Re: possible bug while validating schemas

2006-10-30 Thread Michael Glavassevich
That will probably be good enough but it really depends on how much memory you have. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] "Paul Tomsic" <[EMAIL PROTECTED]> wrote on 10/30/2006 11:27:48 AM: > okay, just for a sanity check

Re: Chained schemas loaded via array of inputstream not supported?

2006-10-30 Thread Michael Glavassevich
Stanimir Stamenkov <[EMAIL PROTECTED]> wrote on 10/30/2006 10:53:12 AM: > /Simon Vogensen/: > > > My problem is this: how do I load these schemas from jar resources? > > I guess because the jar: URIs are opaque [1], relative resources > can't be resolved automatically so you would need to assig

Reading UTF-16: Content is not allowed in prolog

2006-10-30 Thread Jones, David [deljones]
Hi I've been trying to write and read back a UTF-16 encoded XML document, without success. I can seemingly write the document ok (see  WriteUTF16.java ) and Firefox can open it without complaining (except the fact it doesn't have any style information). When I try and read back the document

Re: Reading UTF-16: Content is not allowed in prolog

2006-10-30 Thread keshlam
[Fatal Error] output.xml:1:40: Content is not allowed in prolog. You have something other than the Byte Order Mark, the XML Declaration, Processing Instructions, or whitespace before the document's root element. Fix the file so it's well-formed XML. __ "...

Re: Reading UTF-16: Content is not allowed in prolog

2006-10-30 Thread Michael Glavassevich
Hi David, The encoding declared in your document (in the XML declaration) and the actual encoding of your document probably don't match after you've serialized it to a file. You should be passing a FileOutputStream to the transformer and let it handle the character encoding instead of using a

RE: Reading UTF-16: Content is not allowed in prolog

2006-10-30 Thread Robert Houben
There is one other case where you will get this error.  That’s where you include a prolog that declared the data as UTF-16, but the actual data written was NOT truly UTF-16.  Here is a snippet I use to write data out:       new File(filePath).delete();  

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

Re: external-schemaLocation property

2006-10-30 Thread Michael Glavassevich
"Paul Tomsic" <[EMAIL PROTECTED]> wrote on 10/30/2006 02:46:27 PM: > 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? The only type allowed by this