Re: missing Namespace declaration

2005-05-24 Thread Stanimir Stamenkov
/Tahura Chaudhry/: I am attempting to creating an XML document and then serialize it into a Java string. My code looks like: Document doc= new org.apache.xerces.dom.DocumentImpl(); Element root = doc.createElementNS("http://www.foo.com";, "ns1:data"); ... When I print out the xmlstr , I see

lexical-handler/parameter-entities feature not recognized

2005-06-21 Thread Stanimir Stamenkov
Using Xerces2 version 2.6.2 and trying to set the "http://xml.org/sax/features/lexical-handler/parameter-entities"; feautre on a SAX parser results in a 'org.xml.sax.SAXNotRecognizedException' being thrown. Shouldn't this be a 'org.xml.sax.SAXNotSupportedException', at least? -- Stanimir --

Re: lexical-handler/parameter-entities feature not recognized

2005-06-21 Thread Stanimir Stamenkov
/Michael Glavassevich/: It's probably the case that no one realized that this feature existed. I don't think the SAX specification says that all features defined by it need to be recognized. I see. I was just glancing at

Re: lexical-handler/parameter-entities feature not recognized

2005-06-21 Thread Stanimir Stamenkov
/Michael Glavassevich/: Stanimir Stamenkov <[EMAIL PROTECTED]> wrote on 06/21/2005 06:57:49 AM: Using Xerces2 version 2.6.2 and trying to set the "http://xml.org/sax/features/lexical-handler/parameter-entities"; feautre on a SAX parser results in a 'org.xml.sax.SAXN

Re: annotations in local element using ref

2005-06-22 Thread Stanimir Stamenkov
/Michael Glavassevich/: Alexey Loubyansky <[EMAIL PROTECTED]> wrote on 06/22/2005 09:29:04 AM: It seems like their not supported in the current release? [...] Xerces' XML Schema API very closely models the schema components defined by the schema specification. The corresponding schema compon

[XML Schema] Multiple s for a same namespace from different locations

2005-07-12 Thread Stanimir Stamenkov
Though the XML Schema specification explicitly states : ... it is open to applications to ignore all but the first for a given namespace... I've wondered if there's a feature to configure the 'XMLSchemaLoader' to process all the documents linked

Re: [XML Schema] Multiple s for a same namespace from different locations

2005-07-12 Thread Stanimir Stamenkov
/[EMAIL PROTECTED]/: yes there is, I also needed that feature and luckily some good folks with the needed knowledge implemented it earlier this year (Thanks!), it is: http://apache.org/xml/features/honour-all-schemaLocations your can see the documentation, at the xerces website: http://xml.a

Re: [XML Schema] Multiple s for a same namespace from different locations

2005-07-12 Thread Stanimir Stamenkov
/Stanimir Stamenkov/: I'm having troubles using that property for standalone schema loading as through 'XMLSchemaLoader' instance - it is not recognized property. Sorry everybody - false alarm. Seems I had Xerces version library conflicts with the older 2.6.2 release

Re: XMLSerializer Writer Constructor

2005-07-25 Thread Stanimir Stamenkov
/Stephen Kestle/: Of course it is because Characters should not need to specify encoding, but xml IS NOT a character stream - it's an encoded character stream [...] Don't want to spam the list but: XML _is_ a character stream. The byte encoded representation is for transport means as most da

Re: XMLSerializer Writer Constructor

2005-07-26 Thread Stanimir Stamenkov
/Stephen Kestle/: Well you can always wrap it! Why should I suffer from unnecessary encoding (done by the serializer) then decoding (on my part), further handling character references generated during the first encoding phase (eventually)? Why make something hard to use for people who are

[XML Schema API] XSNamedMap.itemByName(String, String) returning null result

2005-08-05 Thread Stanimir Stamenkov
Using Xerces v2.7.1 I encounter a similar issue when using Xerces v2.6.2 that namespace strings are compared as references rather than using the equals() method therefore the comparison fails although the strings are equal. The example: XSModel xsd; String targetNamespace; String componentName

Re: How do I get a ModelGroup?

2005-08-10 Thread Stanimir Stamenkov
/Kendall Shaw/: I want to parse a schema, to get at the content model of elements. Basing my experimentation on the XSQuery example that comes with Xerces, I have an XSElementDeclaration, but I don't see how to go further? I can get the type definition: XSTypeDefinition td = el.getTypeDefinitio

Re: How do I get a ModelGroup?

2005-08-10 Thread Stanimir Stamenkov
/Kendall Shaw/: I can determine if it is a simple or complex type. Where do I get the XSComplexTypeDefinition from? When you determine the type definition is a complex type one you can safely cast it to XSComplexTypeDefinition. You determine the type by testing the 'typeCategory' property,

Re: Including an xml-file into another xml-file

2005-08-17 Thread Stanimir Stamenkov
/Sogol G/: It is well-formed!! Does the "log.xml" parse alone without errors? Could you try replacing "log.xml" with simpler document which can be verified reliably by human inspection only then repeat the test again? Could you supply us with the original "log.xml"? BTW, I didn't understa

Re: SetNodeValue() method does not work...

2005-09-05 Thread Stanimir Stamenkov
/jonas skrebys/: So when I use method e.getLastChild().getNodeValue() it returns null as I understand method setNodeValue("value") did not set the value to the last node If you follow the spec : nodeValue of type DOMString T

Re: Dom serialization

2005-09-24 Thread Stanimir Stamenkov
/Ali, Haneef/: Consider the following code? a) Element env = Document.createElementNS("soapnamespace", "soap:Envelope"); b) env.setAttribute("xmls:soap", 'soapnamespace"); A) Do we really needs to make the call "setAttribute(...) B) If we don't make that call then serialization with

Feature 'warn-on-undeclared-elemdef' not recognized

2005-10-06 Thread Stanimir Stamenkov
Using Xerces 2.7.1, trying to set the 'http://apache.org/xml/features/validation/warn-on-undeclared-elemdef' feature on an 'XMLReader' instance obtained through the JAXP interfaces causes an 'SAXNotRecognizedException' exception to be thrown. Is this feature still supported? (I see it listed on

Re: Feature 'warn-on-undeclared-elemdef' not recognized

2005-10-07 Thread Stanimir Stamenkov
/Michael Glavassevich/: This feature [1] has been busted for so long I sometimes wonder if it was ever implemented in any version of Xerces 2.x. I once looked back through the CVS history and couldn't find any evidence that it existed anywhere but Xerces 1.x. I've forgotten what file (or what

Re: Behaviour of Schema API's getAnnotation()

2005-10-07 Thread Stanimir Stamenkov
/Bjarke Buur Mortensen/: I have two element declarations (a local and a top-level) looking like this (one is a ref to the other): date ... dateref ... Note, you have only a top-level declaration, the /> is just a con

NPE parsing an empty document using "continue-after-fatal-error"

2005-11-03 Thread Stanimir Stamenkov
Using Xerces 2.7.1 I get NPE trying to parse an empty document, but only when I've set the "continue-after-fatal-error" feature to 'true'. Is this a know issue? The exception stack trace I get: java.lang.NullPointerException at org.apache.xerces.impl.XMLEntityScanner.skipString(XMLEn

Re: Basic guidance

2005-11-04 Thread Stanimir Stamenkov
/Nigel Kibble/: My question is, when I implement the code (shown below) with XercesImpl.Jar in my classpath, am I using the Xerces SAXParser (from the .jar) or am I using SAXParser supplied in the JDK? Note you need both "xml-apis.jar" and "xercesImpl.jar" in your classpath. Read the 'SAXPar

Re: Basic guidance

2005-11-04 Thread Stanimir Stamenkov
/Stanimir Stamenkov/: On the other hand if you want to use the DOM Level 3 interfaces provided by Xerces you'll need to put at least the "xml-apis.jar" in the "endorsed" libraries, at least for compilation - I'm not sure if one would need it run-time. Nigel, a

Re: Basic guidance

2005-11-06 Thread Stanimir Stamenkov
/Michael Glavassevich/: Stanimir Stamenkov <[EMAIL PROTECTED]> wrote on 11/04/2005 09:46:22 AM: On the other hand if you want to use the DOM Level 3 interfaces provided by Xerces you'll need to put at least the "xml-apis.jar" in the "endorsed" libraries, at

Re: inside/outside eclipse vs java 1.4/1.5 vs xerces problem

2005-11-06 Thread Stanimir Stamenkov
/michael sorens/: (1) Why am I seeing a difference between command-line and Eclipse compilation? Check your Eclipse project configuration - you've most probably got the Xerces library set before the System library, which is really loaded at JVM boot, i.e. before Xerces, during run-time (incl

Re: inside/outside eclipse vs java 1.4/1.5 vs xerces problem

2005-11-10 Thread Stanimir Stamenkov
/[EMAIL PROTECTED]/: For Eclipse, I did have the system library above the Xerces library. I tried moving that below the xerces jars (xercesimpl.jar and xml-apis.jar) but this made no difference in Eclipse (i.e. the test file still compiled without error). I can't help you much more as to ask

Re: Problems with jdk1.4 rt.jar and Node.getTextContent

2005-12-15 Thread Stanimir Stamenkov
/Demetrio Cruz/: I'd been using xerces 2.7.1 and I want to use the method getTextContent from org.w3c.dom.Node, but every time I compile my class I get a cannot resolve symbol, so I try it again with -verbose and I notice that it loads the class Node from the rt.jar included in the jdk and not t

[XML Schema] Invalid constraint value error (bug?)

2006-01-04 Thread Stanimir Stamenkov
Using Xerces 2.7.1 I get an error loading the following schema: http://www.w3.org/2001/XMLSchema";> And the error: e-props-correct.2: Invalid value constraint value '0' in element 'sample-elem'. I don't see anything wrong with the schema and I've tried validating

Re: [XML Schema] Invalid constraint value error (bug?)

2006-01-04 Thread Stanimir Stamenkov
/[EMAIL PROTECTED]/: It seems the "default" attribute causes the problems. Maybe a developer can confirm this bug? Seems it is the combination of the pattern facet and the default value. If I remove the pattern facet I don't get error neither. Of course the

Re: [XML Schema] Invalid constraint value error (bug?)

2006-01-04 Thread Stanimir Stamenkov
/Stanimir Stamenkov/: Seems it is the combination of the pattern facet and the default value. FWIW, the same thing but using 'string' base doesn't cause problem: http://www.w3.org/2001/XMLSchema";>

Re: [XML Schema] Invalid constraint value error (bug?)

2006-01-05 Thread Stanimir Stamenkov
/Peter McCracken/: I've looked into the issue, and I don't believe this is a bug; this behaviour is required by the schema spec. Looking at the Element Declaration Properties Correct section of the Schema Spec [1], point 2 states that the "canonical lexical representation" of the default val

Re: [XML Schema] Invalid constraint value error (bug?)

2006-01-06 Thread Stanimir Stamenkov
/Peter McCracken/: So, although it would make more sense to compare the original lexical value against the pattern, the next best choice is to compare the canonical representation of the actual value. Does it makes sense for a pattern conflicting with the canonical representation to be inva

Re: best approach to whole document cloning in Xerces2?

2006-04-19 Thread Stanimir Stamenkov
/Robert Houben/: I ran extensive tests to see if clone would be faster (assumed it would, at first). I found that reparsing the original file (assuming it hadn't changed) was significantly faster than clone. If you have to serialize first, you might lose that advantage but I seem to recall it

Re: best approach to whole document cloning in Xerces2?

2006-04-27 Thread Stanimir Stamenkov
/Robert Houben/: I ran extensive tests to see if clone would be faster (assumed it would, at first). I found that reparsing the original file (assuming it hadn't changed) was significantly faster than clone. If you have to serialize first, you might lose that advantage but I seem to recall i

Re: Validation of XML Schema (XSD) element groups

2006-05-24 Thread Stanimir Stamenkov
See my reply below. /Andrew Paterson/: If I use: ... ... The schema allows me to leave out and elements from the element even though they are mandatory in the group - i.e. it takes notice of the minOccurs="0" attribute on the group reference. However, if the sit

[OT] Re: Validation of XML Schema (XSD) element groups

2006-05-24 Thread Stanimir Stamenkov
/Andrew Paterson/: Note: I came to XML from EDI where mandatory composites with all elements optional are fairly common and have the obvious meaning. I must say that I am glad that there are only two elements in the group - if there were a lot of elements, it would require a long and complic

Re: Reduce DOM Trees size

2006-06-16 Thread Stanimir Stamenkov
/Michael Glavassevich/: Djakisback <[EMAIL PROTECTED]> wrote on 06/16/2006 04:18:37 AM: I'd like to know if someone knows a way to reduce DOM trees size ? (in modifying properties or something else) If you absolutely don't need a namespace-aware DOM (no schema validation, XSLT, XInclude, etc

Re: Reduce DOM Trees size

2006-06-16 Thread Stanimir Stamenkov
just DTD should be supplied which could be conveniently done through the EntityResolver2.getExternalSubset() interface for documents not having a DOCTYPE declaration. I've missed to point a reference for that one: Included in the standard Java 5 framework: http://java.sun.com/j2se/1.5.0/docs/a

Re: Error when parsing ISO-8859-1 encoded documents

2006-07-28 Thread Stanimir Stamenkov
/Inma Marín López/: I have an xml document which includes special characters, for example, melón 1º And I want to get it in canonical form, so I do the following (using Apache XML Security and Xerces 2.7.1): org.apache.xml.security.c14n.Canonicalizer c

Re: Xerces2 DOMParser and getting rid of whitespace

2006-08-07 Thread Stanimir Stamenkov
/Jacob Kjome/: I'm wondering how I get rid of extra whitespace. I seem to be getting an extra text node in the DOM tree for every return character/linefeed at the end of a line. I've tried the following with no apparent change in behavior fConfiguration.setFeature("http://apache.org/xm

Re: XInclude + relative uri problem

2006-08-17 Thread Stanimir Stamenkov
/Dominic Brügger/: Where can I set the system ID for the XML file used as input for the transformation? There's a |Source.systemId| [1] property. You could set the SAX |InputSource.systemId| as well as you never know when it might be needed. public void processXSLT(String inFile, String[]

Re: help with extending saxparser todefine some addtional rules

2006-08-17 Thread Stanimir Stamenkov
/Sharad Singh/: I am using the SAXParser provided in the xerces.jar through which i am able to validate xml based on dtd validations. Now I need to extend the Saxparser functionality so that i can define some additional rules and perform validations on that rules. Can anyone please tell me how

Identifying a character encoding problem

2006-09-13 Thread Stanimir Stamenkov
Even before I've been trying to find a convenient way to identify whether a parsing has stopped because of a character encoding problem. I'm attaching a sample (the main application entry is in "ParsingText.java"): it tries to parse an "UTF-8" encoding mislabeled document which is actually enco

Re: Identifying a character encoding problem

2006-09-14 Thread Stanimir Stamenkov
/Michael Glavassevich/: SAXException [1] is thrown because character encoding errors are fatal errors (as defined by the XML spec) and SAX says fatal errors are reported to the application using that exception. Thanks. I'm now clear why encoding errors are reported as SAXExceptions but again

Re: Identifying a character encoding problem

2006-09-14 Thread Stanimir Stamenkov
(I've send the previous incomplete message by accident, sorry.) /Michael Glavassevich/: SAXException [1] is thrown because character encoding errors are fatal errors (as defined by the XML spec) and SAX says fatal errors are reported to the application using that exception. Thanks. I'm now c

Re: Identifying a character encoding problem

2006-09-15 Thread Stanimir Stamenkov
/Michael Glavassevich/: It wouldn't hurt to wrap it in the SAXException. Note that current implementations of SAXException don't support [1] the JDK 1.4 exception chaining mechanism so you should be calling getException() to get the cause. Could I file an enhancement request in the Apache J

Re: Whitespace problem

2006-09-15 Thread Stanimir Stamenkov
/Timas/: I make validation with XSD. Validation is successfully. Also I add in XSD attribute mixed="false". And whitespaces(node=#text) are also in the DOM tree How to parse without them? See "Re: Xerces2 DOMParser and getting rid of whitespace"

NPE during building a DTDGrammar when parsing with "continue-after-fatal-error" feature

2006-09-20 Thread Stanimir Stamenkov
Xerces 2.8.1: Occasionally a NullPointerException occurs when parsing using the "continue-after-fatal-error" feature (and after fatal errors). I'm attaching the stack trace and the sample test I've used. I'm giving the main "test1.xml" here inline: -"test1.xml" ]> -"test1.xml"--

Re: Premature end of file parsing a ZipInputStream

2006-09-20 Thread Stanimir Stamenkov
/Ismael Ferrer Olmedo/: If "input" is a FileInputStream dumped from the ZipInputStream no problem, but using the ZipInputStream directly is not working. Do you call |ZipInputStream.getNextEntry()| to position the stream at the beginning of the entry data?

Re: NPE during building a DTDGrammar when parsing with "continue-after-fatal-error" feature

2006-09-22 Thread Stanimir Stamenkov
/Michael Glavassevich/: Can you open a JIRA issue to track this problem? I've now filled: https://issues.apache.org/jira/browse/XERCESJ-1193 -- Stanimir - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: Trying to validate XML files using several XSD

2006-09-25 Thread Stanimir Stamenkov
/Decoker, Lydie (Lydie)/: Is there a way to setup the "verbose" mode too? Couldn't you extend XMLCatalogResolver and add debug traces prior invoking the |super.resolveXxx()| methods? XMLCatalogResolver catalog = new XMLCatalogResolver() { public XMLInputSource resolveEntity(...

Re: Additionnal #Text node

2006-09-27 Thread Stanimir Stamenkov
/Decoker, Lydie (Lydie)/: I am not sure I understand what you said :o( If I use the DOM parser provided with the JDK, the \n are not represented in the DOM tree as "#TEXT:". You didn't provide sufficient data to reproduce your case. How do you validate the input? Give your example code. -

Re: Additionnal #Text node

2006-09-28 Thread Stanimir Stamenkov
/Decoker, Lydie (Lydie)/: Here is the code I use to parse and validate my XML files: [...] O.k. So we are just talking about whitespace in element content, unlike you've previously stated: "In fact I was not talking about the whitespace including in an element content". As far as I'm aware

Re: Additionnal #Text node

2006-09-28 Thread Stanimir Stamenkov
/Decoker, Lydie (Lydie)/: I was looking the LSParser and LSParserFilter solution to get ride of those empty nodes. Tried to implement one but not able to remove those empty nodes. The example I've attached here works for me. -- Stanimir package net.example; import javax.xml.XMLConstants; i

Re: XML Schema + Namespace Issues

2006-10-20 Thread Stanimir Stamenkov
/Sean McCauliff/: I have a schema file where I define two complex types and one of the complex types defines an element with the type of the other complex type. When I write an instance file the enclosed element is in an empty namespace instead of being defined in the name space of the type

DOMImplementationRegistry configuration

2006-10-20 Thread Stanimir Stamenkov
In examples on using Xerces specific features I see the way DOMImplementationRegistry instance is obtained is: System.setProperty(DOMImplementationRegistry.PROPERTY, "org.apache.xerces.dom.DOMXSImplementationSourceImpl"); DOMImplementationRegistry registry = DOMIm

Re: DOMImplementationRegistry configuration

2006-10-24 Thread Stanimir Stamenkov
/Michael Glavassevich/: When the system property isn't set, DOMImplementationRegistry will look for a file called META_INF/services/org.w3c.dom.DOMImplementationSourceList in the jars on the classpath to determine the class name. The one in xercesImpl.jar already points to org.apache.xerces.d

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: XMLSerializer running out of memory....

2006-11-02 Thread Stanimir Stamenkov
/Paul Tomsic/: --- [EMAIL PROTECTED] wrote: 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? yes. it's up to 2048 and still blowing up Is this 2048M (Mega) bytes or just 2048 bytes? -- Stanimir --

Re: DTD and namespaces question

2006-12-08 Thread Stanimir Stamenkov
/Jacob Kjome/: But Xerces gives me the following error in parsing... [xmlc] D:\myclasses\Repository\Enhydra\tomcatXHTML\res\page\xhtmlbasic.xhtml:26: Error: A colon is not allowed in the name 'IS10744:arch' when namespaces are enabled. [xmlc] Error: Parse of "D:\myclasses\Reposito

Re: question about parsing XML using Xerces

2006-12-21 Thread Stanimir Stamenkov
/legolas wood/: but the Xerces distro that i download from apache site does not conitan org.apache.xpath.XPathAPI As Michael Glavassevich already pointed it is found in Xalan [1], not Xerces. [1] http://xml.apache.org/xalan-j/ -- Stanimir -

Re: Schema not found

2006-12-22 Thread Stanimir Stamenkov
/Milan Tomic/: How should I set system ID on an InputSource? InputSource interface does not have such method/constructor. I am using FileInputStream to construct InpoutStream. Shouldn't that be enough? I don't know where you're looking at but the |InputSource| class [1] has constructors for

Re: Fwd: Feature names

2006-12-27 Thread Stanimir Stamenkov
/Prashant/: I don't think so. The feature identification by URLs may be a convention followed by SAX specification in creating a namespace for string like "validation". However this convention is not unprecedented. In XML world many namespaces (Schema ns declaration[1] for example) are URLs

Re: Accessing annotated XML schema

2006-12-30 Thread Stanimir Stamenkov
/Igor Lobanov/: The question is whether there is a way to retrieve such "annotations" from the schema object model in a standard or a Xerces-specific way? I havn't found any way to do it by studying XML Schema API offered by Xerces. Unless I'm missing something you just access the annotations

Re: xinclude: xpointer needed when href absent

2007-01-06 Thread Stanimir Stamenkov
/flyboy/: Seems to me, that this should pass schema validation, where xmlns:xi=''http://www.w3.org/2001/XInclude"; Instead, xerces-j 2.9.0 schema validation gives: 'xpointer attribute must be present when href attribute is absent.' This passes schema validation, but its not valid against th

Re: referencing elements from XML schema in another schema

2007-01-06 Thread Stanimir Stamenkov
/Kevin Ott/: http://www.w3.org/2001/XMLSchema";> You must have: http://www.w3.org/2001/XMLSchema"; /> the least. Then I don't know if Xerces will automatically resolve a location for the XML Schema namespace - you might need to supply 'location' attribute

Re: Controlling location of the namespace declaration

2007-01-08 Thread Stanimir Stamenkov
/Igor Lobanov/: I guess the above result is because of specific normalization / optimization algorithm - the serialization would need to look ahead which might not be always possible to produce the form you want. I don't know if the namespace normalization algorithm [1] for the DOM

Re: Memory leak in DomParser

2007-01-09 Thread Stanimir Stamenkov
>> I check it also in 2.9, and the problem still exists. > > It'd be easier to diagnose if we had: > a) a sample of the input to the parser > b) the stacktrace generated when the program fails As far as I know there's no stack trace available to OutOfMemory errors with the Sun's Java 1.3/1.4

Re: Memory leak in DomParser

2007-01-09 Thread Stanimir Stamenkov
/Avihai Marchiano/: I test it with JProbe and it seems that the diagnostic, which describe in the following post is the problem: http://mail-archives.apache.org/mod_mbox/xerces-j-users/200212.mbox/[EMAIL PROTECTED] Have you tried the proposed changes from the referenced message? From the r

Re: referencing elements from XML schema in another schema

2007-01-09 Thread Stanimir Stamenkov
/Michael Glavassevich/: Stanimir Stamenkov <[EMAIL PROTECTED]> wrote on 01/06/2007 09:30:58 AM: You must have: http://www.w3.org/2001/XMLSchema"; /> the least. Then I don't know if Xerces will automatically resolve a location for the XML Schema namespace It do

Re: Resolving multiple XSDs/namespaces

2007-01-29 Thread Stanimir Stamenkov
/Jo Vandermeeren/: I want to parse and validate the entire message in 1 run, and need to use 2 XSD schemas. The XSD's used for validation are packaged inside our application and need to be resolved locally.. I can attach an EntityResolver on the parser, but only one call is issued to resolve t

Re: No validation error message when the root element is erroneous

2007-05-10 Thread Stanimir Stamenkov
Thu, 10 May 2007 05:16:33 -0700 (PDT), /aac/: Thu, 10 May 2007 07:46:33 -0400, /Michael Glavassevich/: Did you mean that the element isn't declared anywhere? If that's the case, you should check if you have the dynamic validation [1] feature enabled (don't set it to true if that's not the beh

Re: An invalid XML character (Unicode: 0x1e) was found in the CDATA section

2007-08-08 Thread Stanimir Stamenkov
Tue, 7 Aug 2007 22:42:40 -0400, /Michael Glavassevich/: Max Bowsher <[EMAIL PROTECTED]> wrote on 08/07/2007 09:55:10 PM: The unicode character 0x1e is forbidden outright from appearing in an XML document. There is no way to represent it within XML. True for XML 1.0 but not for XML 1.1 [1] (th

Re: optimise XmlSerialise.serialise(Document doc)

2007-08-08 Thread Stanimir Stamenkov
Wed, 8 Aug 2007 02:21:35 -0700 (PDT), /richa/: ... the method i'm using to write the file is not able to read the special characters like !/-. What do you mean with "the method i'm using to write the file is not able to read"? How can i resolve such issue, because this is abst necessary fo

Re: Does LSSerailzer creates a thread of its own.

2007-08-28 Thread Stanimir Stamenkov
Mon, 27 Aug 2007 05:20:32 -0700 (PDT), /richa/: Fri, 24 Aug 2007 08:17:12 -0400, /Michael Glavassevich/: Thu, 23 Aug 2007 22:46:25 -0700 (PDT), /richa/: Does LSSerializer creates a thread of its own, while writing a file. I'm using LSSerailizer.write() funtion to generate an xml file. and my f

Re: Does LSSerailzer creates a thread of its own.

2007-08-29 Thread Stanimir Stamenkov
Tue, 28 Aug 2007 23:07:14 -0700 (PDT), /richa/: It worked. Thanx a lot :-) For the sake of completeness, the following sample uses just the Java 1.1 API: FileOutputStream fileOut = new FileOutputStream("..."); FileDescriptor fd = fileOut.getFD(); OutputStream out = new FilterOut

Re: Building a Project with Ant using Xerces and JDK 1.4.2

2007-09-24 Thread Stanimir Stamenkov
Mon, 24 Sep 2007 12:34:13 -0700 (PDT), /Anthony N. Frasso/: However, while I can see how to set a system property using the java command (or task), I don't see how to set a system property using the javac compiler. You may try overriding the bootclasspath [1] or prepend the xml-apis.jar to it

Hangup using the "continue-after-fatal-error" feature

2007-10-05 Thread Stanimir Stamenkov
Although I'm aware the behavior while using this feature is undetermined I report such bugs because of others which may are interested in improving the reliability while using the feature. I'm attaching a sample code and input data which cause the parser (Xerces-J 2.9.1) to hang. -- Stanimir

Re: Hangup using the "continue-after-fatal-error" feature

2007-10-09 Thread Stanimir Stamenkov
Mon, 8 Oct 2007 10:28:01 -0400, /Michael Glavassevich/: Can you open a JIRA issue (including your test) to track this problem? Created XERCESJ-1273: https://issues.apache.org/jira/browse/XERCESJ-1273 -- Stanimir - To unsubs

Re: Unable to insert comment before document element

2007-10-26 Thread Stanimir Stamenkov
Fri, 26 Oct 2007 16:20:57 +0200, /Spaan, Henk/: As far as I know there is no objection against having a comment between the document type definition and the document element. So why can't I insert a comment before an existing document element with xerces. Element root = doc.getDocumen

Re: XSAttributeGroupDefinition

2007-12-06 Thread Stanimir Stamenkov
Thu, 6 Dec 2007 10:38:59 -0800, /Srdjan Djuricic/: My issue is when parsing a XSAttributeGroupDefinition and encountering a XSAttributeUse I don't know how to identify whether that attributeUse is obtained from another attributeGroup or not. As far as I can tell you can't determine what you

Re: createTextNode() and special characters

2008-01-08 Thread Stanimir Stamenkov
Tue, 8 Jan 2008 02:22:09 -0800 (PST), /Milan Tomic/: I have this piece of the code: (I hope that all of you, with your encoding, can see the second line) org.w3c.dom.Element e1 = doc.createElement("element1"); Node n1 = doc.createTextNode("ČĆŽŠĐčćžšđ"); [...] Make sure you don't use non-ASCII

Re: Implementation error with Xerces 2.9

2008-01-18 Thread Stanimir Stamenkov
Fri, 18 Jan 2008 09:20:50 -0500, /Weston, Steven/: I'm trying to implement the newer Xerces SAX 2.9 parser. For ease of use (at least I thought) I used the provided instructions to create a single xerces.jar file from the 2.9 components. From what I read it looked like this should allow me t

Re: unexpected SAX character event

2008-01-26 Thread Stanimir Stamenkov
Sat, 26 Jan 2008 10:44:32 +0530, /Mukul Gandhi/: [...] public void characters(char[] ch, int start, int length) { System.out.println("--characters--"); System.out.println((new String(ch)).trim()); System.out.println("!

Re: unexpected SAX character event

2008-01-26 Thread Stanimir Stamenkov
Fri, 25 Jan 2008 14:29:58 +0530, /Mukul Gandhi/: Even for elements like , the SAX parser produces character events. But the text content will be null. I am presently not sure, what the SAX standard says. I'll leave it for others to comment. Your first statement is not true, at least for Xer

Re: Accessing xml and doctype declaration via SAX

2008-03-13 Thread Stanimir Stamenkov
Wed, 12 Mar 2008 16:25:59 -0300, /Daniel Yokomizo/: The only issue I still have is getting the xml declaration info (e.g. version, encoding) but right now I can just ignore it. That info you should be able to obtain through the Locator2 [1] interface. For example, in your ContentHandler imp

Re: LSoutput setEncoding("UTF-8") ignored - output XML not UTF-8 compliant

2008-03-13 Thread Stanimir Stamenkov
Tue, 11 Mar 2008 13:08:55 -0700 (PDT), /Rob Davis-5/: So in conclusion if I use solution 2 - then I get the desired encoding - I've got a work around - my problem is solved. But LSoutput setEncoding("UTF-8") DOES NOT WORK so i'd still like to know why In both cases you're serializing to a

Re: New line & tab characters getting replaced by space

2008-04-20 Thread Stanimir Stamenkov
Sun, 20 Apr 2008 14:32:47 +0530, /indian scorpio/: On Fri, Apr 18, 2008 at 5:02 PM, <[EMAIL PROTECTED]> wrote: Whitespace will always be normalized in XML attribute values. If you don't want that happening, put the text in a child element instead. http://www.w3.org/TR/REC-xml/#AVNormalize A

Re: XML Parsing Error

2008-04-26 Thread Stanimir Stamenkov
Thu, 24 Apr 2008 12:34:54 -0400, /Dhamelia, Krunal/: Now when I run it on Windows 2000 machine it parses the XML properly that means I get the 'RÈLÉSIX' displayed properly on my screen, But when I run it on UNIX machine it is not able to parse this properly it is giving me some Junk value (RA?L

Re: Parsing xml schema, what happened to XSElementDeclaration.getAnnotationAttrs()?

2008-08-31 Thread Stanimir Stamenkov
Hello Eric, Thu, 21 Aug 2008 14:03:26 +0200, /Eric Lilja/: Hello, my first time posting on this list. I've taken over some code that was written several years ago and I'm supposed to update it. One of the things the code does is parse an xml schema. I encountered a problem when I upgraded xer

Re: Parsing xml schema, what happened to XSElementDeclaration.getAnnotationAttrs()?

2008-08-31 Thread Stanimir Stamenkov
Sun, 31 Aug 2008 19:34:07 +0200, /Eric Lilja/: public class ParseXMLSchema { public static void main(String[] args) { ParseXMLSchema instance = new ParseXMLSchema(); instance.parseXMLSchema(new File("test-1.xsd")); } private void parseXMLSchema(final File f) { parseX

Re: How to extract include and import from schema

2009-01-07 Thread Stanimir Stamenkov
Wed, 7 Jan 2009 11:00:05 +0530, /Krishna Gopal Binyala/: I am using xerces, framework for Schema parsing, i need to extract and from the schema and manipulate the schemaLocation from. I am XSModel for this, but not able to retrieve include and import from schema How it can be achieved. ?

Re: Xerces-J Jars

2009-02-01 Thread Stanimir Stamenkov
Sat, 31 Jan 2009 03:05:07 -0500, /Dave Brosius/: It's more than just line numbers, it's also local variable tables, sourcefile info the line number table is 4 bytes per sourceline of code in a method. the local variable table is 10 bytes per local variable (including parms) I don't believe t

Re: Distinguishing parse errors from validation errors

2009-02-22 Thread Stanimir Stamenkov
Sun, 22 Feb 2009 09:38:50 +0100, /q3s38w...@sneakemail.com/: I'm using Xerces2-J to parse an XML document into a DOM. My application is XML Schema aware, and the XML documents that my app is parsing are defined via a schema. When my application reads the XML document, it installs an ErrorHandle

Re: Set EntityResolver to the SchemaFactory

2009-09-13 Thread Stanimir Stamenkov
Sun, 13 Sep 2009 15:52:18 +0530, /Sagara Gunathunga/: As we set org.xml.sax.EntityResolver to the DocumentBuilder using DocumentBuilder#setEntityResolver(entityResolver) method, is there any way to provide a EntityResolver to the SchemaFactory so that it will utilize EntityResolver when we ca

Re: Set EntityResolver to the SchemaFactory

2009-09-13 Thread Stanimir Stamenkov
Sun, 13 Sep 2009 17:21:02 +0530, /Sagara Gunathunga/: On Sun, Sep 13, 2009 at 4:45 PM, Stanimir Stamenkov wrote: http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/SchemaFactory.html#setResourceResolver(org.w3c.dom.ls.LSResourceResolver) I don't think resourceResolv

Re: honour-all-schemaLocations feature

2009-10-21 Thread Stanimir Stamenkov
I guess one could prepare a source schema which contains only s of the given elements. The locations could use custom URIs like "urn:x-jax-ws-import-a", "urn:x-jax-ws-import-b" which would be resolved by a custom resource resolver. I think the "honour-all-schemaLocations" feature should wo

Re: honour-all-schemaLocations feature

2009-10-24 Thread Stanimir Stamenkov
Wed, 21 Oct 2009 14:34:25 -0700, /Jitendra Kotamraju/: Stanimir Stamenkov wrote: I guess one could prepare a source schema which contains only s of the given elements. The locations could use custom URIs like "urn:x-jax-ws-import-a", "urn:x-jax-ws-import-b" which wo

Re: Loosing significant space in LSSerializer

2009-11-25 Thread Stanimir Stamenkov
Mon, 23 Nov 2009 11:20:23 +, /Chris Simmons/: I raised a bug (which included a patch) over two years ago due to different behaviour between the Xerces/Xalan LSSerializer but it has seemingly been ignored. https://issues.apache.org/jira/browse/XALANJ-2409 I wonder if LSSerializer bugs are f

Re: namespace prefixes

2010-10-24 Thread Stanimir Stamenkov
Fri, 22 Oct 2010 15:23:03 -0700, /Mark Brucks/: Your example is still dealing with the interpretation of a prefix in an existing document, and I don't have an existing document. I am in control of which namespaces and which prefixes would be used. As Michael has already pointed out the schema

Re: Problems with missing properties accessExternalSchema accessExternalDTD in Xerces2

2024-01-15 Thread Stanimir Stamenkov
Mon, 15 Jan 2024, /Martin/: "Code that uses the JDK’s internal copy of the Xerces XML processor [might fail]. Such code should instead use a standalone copy of the Xerces library, available from Maven Central." https://openjdk.org/jeps/403 I'm just curious, what Xerces-specific classes are

  1   2   >