cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Trying to inspect an element's defined DTD attributes from non-editor JVM

bbeetcher
1-Newbie

Trying to inspect an element's defined DTD attributes from non-editor JVM

This is a little off the track of a pure Adepters question, so if it's appropriate to send me to an internet discussion group somewhere, feel free to suggest one for that. I looked a little and couldn't locate one. So, I thought perhaps one of the experts in document processing monitoring this forum might be able to provide some help.

Under the Arbortext Editor's JVM, we are able to use an AOM Acl.func("tag_has_attr", elementName, attributeName, docID) call to test whether the DTD for an XML source file says a named attribute is applicable to a named element.

We have need to do that test running under a free standing (non-editor) jdk1.5.0_15 JVM where we're currently using the org.w3c.dom and javax.xml.parsers java packages to process XML source files looking for concerns in them. However, the DOM classes only appear to provide functions for inspecting whether an instance element in a DOM instance document has an attribute value either physically specified or has it defaulted with a value from its DTD definition. A few tries using the DOM DocumentType class getEntities() and getNotations() functions to print out the names of the nodes they return didn't show anything that seemed helpful for inspecting what the DTD has configured.

So at this point, we would sure benefit from any suggestions any of you might have on what java API(s) could help us inspect an element's attribute definitions in the DTD.

0 REPLIES 0
Top Tags