Is it possible to revalidate a DOM tree, or can validation only be done at
parsing time from the text input? Many of my problems would be helped if I
could just revalidate the tree without having to print it to a String and
reread it first...
pm
From: Andy Clark <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: DTD DOM-like model
Date: Wed, 21 Feb 2001 20:06:36 -0800
"RAHMAN,ABDUR (HP-Sunnyvale,ex1)" wrote:
> Please let me know if Apache has a solution for this or there
> is a third party solution exist for this matter.
No we don't have a solution for this at the time. However, I
think that this could be supported in the future by building
a DOM document from the XNI DTD callbacks. Here's a completely
made-up example:
<!ENTITY % string 'CDATA'>
<!ELEMENT foo (bar)*>
<!ELEMENT bar EMPTY>
<!ATTLIST bar baz %string; #REQUIRED>
<dtd xmlns='http://xml.apache.org/Xerces2/DTD'>
<entityDecl name='%string' value='CDATA'/>
<elementDecl name='foo'>
<children occurs='*'>
<elementRef name='bar'/>
</children>
</elementDecl>
<elementDecl name='bar'/>
<attlistDecl element='bar'>
<attributeDecl name='baz'>
<type name='CDATA'/>
<required/>
</attributeDecl>
</attlistDecl>
</dtd>
Of course, the breakdown is completely arbitrary but I know
that a lot of people will want the separation to be very
fine-grained so that they can figure out where parameter
entities are expanded in the DTD. For example, in the
previous example, there is a parameter entity used for the
attribute declaration type. This could translate to a DOM
subtree that looks like this (pardon the bizarre syntax):
ENTITY_REFERENCE_NODE: name='string', value=null {
ELEMENT_NODE: name='type', value=null [
ATTRIBUTE_NODE: name='name', value='CDATA'
]
}
Your request is relevant to determing the XNI DTD callbacks.
You should contribute to the discussion thread "[XNI] DTD
Information Set" on the xerces-j-dev mailing list. We could
use your feedback.
--
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.