Hello all,

Is there an easy way to check if a certain element (name given) exists
somewhere in the DTD(s), and if it's optional or not?
I've recently started working with Xerces, in a
communicating-interface-component thingy, using a DOMParser to validate
messages and then extract certain values from the message and send them
further on "down the chain" in other formats.

The DTD given in the XML message points further on to another DTD too...
I've looked among the classes in the hierarchy, but haven't been able to
figure out what to use for this yet. :-(

* Example:
in the xml message (foo1.xml):
...
<!DOCTYPE MESSAGE SYSTEM "FOO1.dtd">
...(tags)...

in FOO1.dtd:
<!ENTITY % FOOResources SYSTEM "FOOResources.dtd">
%FOOResources;
<!ELEMENT MESSAGE (HEADER,FOO1)>
<!ELEMENT FOO1 (element1?, element2...etc)>

in FOOResources.dtd:
<!ENTITY % FOOSegments SYSTEM "FOOSegments.dtd">
%FOOSegments;

....and in FOOSegments.dtd is the HEADER element structure specified. This
is what I want =)

The header element is a standard thing, which is in all messages, so all
messages have a HEADER section plus something else, per message.
So, I would like to check if a certain element, that is a child of HEADER,
exists (is declared somewhere in the DTD:s) and if it's optional or not.

Any help is really appreciated!

/Stefan



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to