You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Ingo Schildmann <is...@TechFak.Uni-Bielefeld.DE> on 2000/08/29 17:07:48 UTC

Migrating from xml4j_1_1_16 to xerces

Hi,

for my diploma thesis I'm working with an old thesis, 
an XML-editor that was written with xml4j_1_1_16.
That editor builds a DOM of an XML-file. You can
edit the file either in the textfield or in a tree
presentation of the DOM.
If you edit the tree, the textfield will be automaticly
altered. 
I'm thinking about migration the editor to the newest xerces-version,
but I encounter heavy difficulties:
- With the old parser it was possible to parse the internal or external 
  DTD to validate the XML
- after a change of the tree, the whole DOM would be printed new in
  the textfield with the DOCTYPE-Information and all ignorable whitespace,
  that means almost all non-PCDATA whitespace was still, like it was in the 
  beginning.  

My trials with DOMs parsed with Xerces and different Features 
(like grammar-access or ignore-whitespace) didn't bring the hoped result.
I couldn't get the internal DTD with Document.getDocType() and couldn't
produce an XML-String out of the DOM that looked like the original
(I was using the Serializer).

I fear that the old XML4J TXDocument had methods that were against the
spirit of DOM and that's maybe the problem.

I hope this s comprehensible and I'm thankful for help,

		Ingo

Ingo Schildmann                   ischildm@techfak.uni-bielefeld.de
-------------------------------------------------------------------
"We've heard that a million monkeys at a million keyboards could
produce the Complete Works of Shakespeare; now, thanks to the
Internet, we know this is not true."
                          Robert Wilensky, University of California


Re: Migrating from xml4j_1_1_16 to xerces

Posted by Andy Clark <an...@apache.org>.
Ingo Schildmann wrote:
> - With the old parser it was possible to parse the internal or 
>   external DTD to validate the XML

Nope. Gone. Can't be done with the current version of Xerces. It's
something we're thinking about for Xerces 2, though.

You'll probably have to stay with 1.1.16 for now.

-- 
Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org