Re: Review: Serializer API - the related failure.

2000-03-22 Thread Boris Garbuzov
My notice might be related to the subject. DOMSerializer serializes newly created Element and DocumentFragment for me, but refuses the root element, throwing java.lang.ClassCastException: org.apache.xerces.dom.TextImpl at

Re: Review: Serializer API

2000-03-22 Thread Wong Kok Wai
Here's a good tutorial on how to use the serialiser: http://metalab.unc.edu/xml/slides/sd2000west/xmlandjava/185.html Boris Garbuzov wrote: Even if I misuse the API (I should not call this directly?) it should have failed friendlier than this:

Re: Deep copy of node from other document

2000-03-22 Thread Andy Heninger
The method you are looking for is Document.importNode(). -- Andy - Original Message - From: Martin Duerig [EMAIL PROTECTED] Sorry for asking novice questions: What is the best strategy to deep copy a node from one document to another one?

Re: createDocument factory methods

2000-03-22 Thread Andy Heninger
The new API for document creation in DOM level 2 is not quite as succinct as the old static createDocument() method from the Xerces-c DOM level 1 implementation, but it's not quite as bad as all that. Here's some sample code, taken from the CreateDOMDocument sample included with Xerces 1.1,

Re: Review: Serializer API

2000-03-22 Thread Jeffrey Rodriguez
Mr. Garbuzov, you just found a bug. In XMLSerializer public void endElement( String namespaceURI, String localName, String rawName ) { ElementState state; // Works much like content() with additions for closing // an element. Note the different

Re: Review: Serializer API

2000-03-22 Thread Jeffrey Rodriguez
Andy Clark wrote: DOMSerializer: I'm sort of surprised that there are methods to serialize a Document, Element, and DocumentFragment but nothing for a generic Node. In fact, if you wanted to serialize a text node or entity reference, you would first have to remove or clone it into a

Re: [Fwd: Help!]

2000-03-22 Thread Andrea Schneider
[EMAIL PROTECTED] wrote: Did the larger XML document work before? My guess is that you need to increase the default heap size for java.exe. The default heap size is 16MB for JKD1.1.8. So, with 90,000 lines of XML you'll suck up a big portion of that heap. Try increasing the heap size

Re: [Xerces-C] Patches for OS/2 port

2000-03-22 Thread Bill Schindler
[EMAIL PROTECTED] wrote: Thanks Bill. We'll try to get those in next week. So, uh... Are those patches going to make it in? --Bill

Strange way to handle white spaces during parsing

2000-03-22 Thread Jean-Christophe Broudin
Hi, We have noticed that, with an XML file such as: A B C Bono /C /B /A if one asks how many childs A tags owns (using getLength() on getDocumentElement().getChildNodes() ), the answer is 3. After

Re: Status of COM wrapper (was xerces for Delphi)

2000-03-22 Thread Franz-Leo Chomse
On Wed, 22 Mar 2000 09:52:17 -0500, [EMAIL PROTECTED] wrote: IBM recently donated a COM wrapper of Xerces to Apache. It looks like the source are checked into CVS, but no binary distribution has yet been released. Other than that, I don't know the status. -Rob Thank's Franz-Leo

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread Norman Walsh
/ Jean-Christophe Broudin [EMAIL PROTECTED] was heard to say: | We have noticed that, with an XML file such as: | | A | B | C Bono /C | /B | /A | | if one asks how many childs A tags owns (using getLength() on |

Fwd: Strange way to handle white spaces during parsing

2000-03-22 Thread Jeffrey Rodriguez
I really wonder: Isn't it weird? No, it is not. Read section 2.10 of the XML 1.0 Recommendation. Is it the normal behavior? Yes, it is. Is there a means to disable this, and have an IE-5.0- like behaviour? Yes, set http://apache.org/xml/features/dom/include-ignorable-whitespace;

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread Norman Walsh
/ Juergen Hermann [EMAIL PROTECTED] was heard to say: | Is there a means to disable this, and have an IE-5.0-like behaviour? | | Yes. Write and use a DTD, so the parser knows that A does not contain mixed | content. Note that this does not mean that you need to use the validating

[Xerces-J] Serializable Documents

2000-03-22 Thread kito_mann
I noticed that DocumentImpl implements Serializable (as does NodeImpl), but several other classes (like DocumentTypeImpl) don't. I'm trying to send a DocumentImpl back form an EJB server, and obviously it's not working. I'm assuming that the preferred method of doing this is just to use the

Bug in tutorial

2000-03-22 Thread Boris Garbuzov
Thanks to those who advised me a tutorial http://metalab.unc.edu/xml/slides/sd2000west/xmlandjava/189.html. Just the code lines BigInteger low = BigInteger.ZERO; BigInteger high = BigInteger.ONE; need to be changed into BigInteger low = new BigInteger (0); BigInteger high = new

RE: SVG goes to DOM

2000-03-22 Thread Arnold, Curt
Steven Coffman wrote: If SVG is going to be DOM based, rather than treated as a special case form of XSL:FO, then that immediately says, Xerces to me. Should an implementation of the W3C's SVG DOM be part of Xerces? Does that allow us to do anything cool? Should it continue to be part of FOP? If

Re: [Xerces-C] Patches for OS/2 port

2000-03-22 Thread roddey
Did you mail me the OS/2 platform/compiler files? If you did, then my tiny brain must have deleted that message by mistake since the last message I see from you in my inbox is the big diff message you sent. Can you send me the OS/2 files in a zip and I'll pass them along to Rahul to integrate.

Re: [Xerces-C] Patches for OS/2 port

2000-03-22 Thread roddey
Bill, Can you just send your OS/2 files to Jeffrey? He has an OS/2 development machine setup and can test out your changes and he has commit access. So mail them to: [EMAIL PROTECTED] If you've already mailed them to me, that's ok. I'll just vector them to him. But if you see this

Re: change of Node.getOwnerDocument()

2000-03-22 Thread Ralf I. Pfeiffer
Yes. This was changed to be conformant to the spec. Boris Garbuzov wrote: I am playing with Xerces API as if I unit-tested it on a basic level: applying every available method in a way so that just it does not fail. And I noticed some change of Node.getOwnerDocument() after downloading

RE: Generate XML from DTD

2000-03-22 Thread Watson, Tom
Sangita Gupta wrote: I wish to write a java code which can generate an xml document based on a given dtd. Walk through the dtd, know which tags (name) to include in the xml document, grab the value froma string and generate the document. Is it possible? Any example will be greatly appreciated. I

Re: Review: Serializer API

2000-03-22 Thread Andy Clark
How about changing Method not to MimeType but rather to ContentType? A construct I use *very* often in my HTML files is the following: meta http-equiv='content-type' contents='text/html; charset=x-sjis' Which would correspond to an equivalent response line from a web server or a header line in

Re: Generate XML from DTD

2000-03-22 Thread Sangita Gupta
Thanks Tom. This gives me something to chew on. I will research it further and keep you posted with the latest. Sangita Watson, Tom wrote: I have been researching this also and there would seem to be a lot of demand since lots of corporate data is in flat files. I have basically seen three

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread Norman Walsh
/ [EMAIL PROTECTED] was heard to say: | If a DTD is present, its read and the information required to make this | decision is present. It doesn't require validation, just a check to see | what type of content model the element has. I'm not comfortable with that answer at all. I think an option

Re: Xerces bug: base URI and external parsed entities

2000-03-22 Thread Andy Clark
Norman Walsh wrote: Is it possible to access the URI of the document currently being parsed from XMLDTDScanner.scanEntityDecl()? I think you can query the XMLEntityHandler for this information. XMLDTDScanner has a reference to it. -- Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread Andy Clark
Norman Walsh wrote: !DOCTYPE test [ !ELEMENT a (b+) !ELEMENT b (#PCDATA) ] atestb/ b/this! 4 or 5?/a !ELEMENT a (#PCDATA|b)* !ELEMENT b EMPTY -- Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread Norman Walsh
/ Andy Clark [EMAIL PROTECTED] was heard to say: | Norman Walsh wrote: | !DOCTYPE test [ | !ELEMENT a (b+) | !ELEMENT b (#PCDATA) | ] | atestb/ b/this! 4 or 5?/a | | !ELEMENT a (#PCDATA|b)* | !ELEMENT b EMPTY Huh? I guess I wasn't clear. I explicitly constructed a document that was

Re: [Xerces-J] Serializable Documents

2000-03-22 Thread Andy Clark
[EMAIL PROTECTED] wrote: I noticed that DocumentImpl implements Serializable (as does NodeImpl), but several other classes (like DocumentTypeImpl) don't. I'm trying to send a DocumentImpl back form an EJB server, and obviously it's not working. I'm assuming that the preferred method of doing

Re: Review: Serializer API

2000-03-22 Thread Arkin
Andy Clark wrote: First, I'd like to look at what's currently in the API and then discuss some points of design that I'd like to see in the serializers. DOMSerializer: I'm sort of surprised that there are methods to serialize a Document, Element, and DocumentFragment but nothing for a

Re: Review: Serializer API

2000-03-22 Thread Arkin
I could not understand, were you just sending an endElement without a stateElement? (I can't check the line number right now, I have a newer copy on my machine that hopefully fixes this bug.) arkin Boris Garbuzov wrote: String unexistingName = unexistingName;

Upcoming Re: Review: Serializer API

2000-03-22 Thread Arkin
Sorry for not being available lately, we have two major releases scheduled for the O'Reilly conference. No time to breath. The following is scheduled for release RSN: The serializers have been revised to include some bug fixes, performance improvement and preliminary support for encodings. They

PATCH: Re: Xerces bug: base URI and external parsed entities

2000-03-22 Thread Norman Walsh
The following patch seems to fix the relative URI bug. If (one of) the Xerces maintainers deems it worthy, please check it in :-) Index: XMLDTDScanner.java === RCS file:

Re: [Xerces-J] Serializable Documents

2000-03-22 Thread Arkin
Anyway, I think it's more efficient to write the document to XML form, serialize *that*, and reparse it on the other end than to use Java serialization of Objects. The standard Serializable format on the wire is huge. And not as efficient as people would think due to the use of reflection.

Re: Review: Serializer API

2000-03-22 Thread Arkin
That's the explanation. arkin Jeffrey Rodriguez wrote: Mr. Garbuzov, you just found a bug. In XMLSerializer public void endElement( String namespaceURI, String localName, String rawName ) { ElementState state; // Works much like

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread Andy Clark
Norman Walsh wrote: Huh? I guess I wasn't clear. I explicitly constructed a document that was well-formed but not valid. My question comments had to do with ignorable whitespace in a non-validating parse. Gotcha. In non-validating case (with or without a DTD), all character content is

Re: Strange way to handle white spaces during parsing

2000-03-22 Thread roddey
Sorry, my mind wasn't in gear. I was pointing out how it could work, but should have pointed out that we of course do the right thing (at least the C++ parser) and always call characters() if we are not validating. Dean Roddey Software Weenie IBM Center

Configurable missing?

2000-03-22 Thread brk
Hi all, It seems that org.xml.sax.Configurable was removed from xerces.jar starting with 1.0.2. Was this intentional, and if so, where should I find it? Bryn Keller Senior Software Engineer Jenkon International [EMAIL PROTECTED]

RE: SVG goes to DOM

2000-03-22 Thread COFFMAN Steven
This was a FOP message, but you're the DOM experts, so I'd like to get your input. The end result we want is that Scalable Vector Graphics (SVG) be translated to PDF. Kieron's been treating SVG sort of as a special case of XSL:FO, which is why it's been [uncommitted, but still] in FOP. If

static library for unix build?

2000-03-22 Thread Dean Hoover
Are you going to add creation of a static library for Xerces C in some future release? I would rather not use the shared library. Thanks in advance. Dean Hoover

Re: static library for unix build?

2000-03-22 Thread roddey
No, we do not support a static configuration, nor do we really have any plans to. You are free to do it yourself, but we will not have any officially supported static configuration. Dean Roddey Software Weenie IBM Center for Java Technology - Silicon

Re: How to finish/close a document

2000-03-22 Thread Ralf I. Pfeiffer
DTD/Schema access, caching, and re-validation is being investigated. These issues are also on the table for DOM Level 3 discussion. Currently, your method of writing XML and re-parsing - however convoluted - is the easiest. Regards, -Ralf

DIfference between Xerces 1.1 and IBM XML4C

2000-03-22 Thread PHAN Tri
Hello, Being fairly new to XML, I was wondering if anyone cam answer the following questions. 1. What is the difference between Xerces 1.1.0 and IBM XML4C 3.1 ? 2. Would you recommend the use of Xerces in mission critical, real-time applications ? 3. What type of support will we have with