
Dan:
At Wednesday, 13/02/2008, 12:16 PM;, Dan wrote: your post is a bit confusing, and some better details/explanations would be nice to see. What do you mean by "write a list of all possible absolute Xpaths to a text file."
Rephrasing my original request: I am developing a CSS implementation for [instance documents that conform to] an XML schema. It would really help to check if all [required CSS class matches] have been covered if I could find a utility that would scan a DTD (including *.mod inclusions) or XML Schema to write a list of all absolute -- not including wildcards -- [Xpaths from the root element to each possible leaf element] ... to a text file. For example, using a possible path from a DITA DTD: /reference/refbody/section/p This would help determine what class definitions can be generic no matter in what context an element apppears (e.g. <i>) and what may need different treatment depending on context (e.g. */section/title). Oh, and if the generator could list the Xpath in reverse, from leaf node to root, as well that would be pleasant: p\section\refbody\reference\ Then I could sort the list of paths so that all instances where <p> was a leaf would be together and I could decide which contexts could share a CSS class and which would need context-specific classes. I've tried using the <oXygen/> instance generator on the DITA task.xsd, but even limiting recursion depth and number of repetitions, it produces very large files, possibly not completing in my lifetime. And then there is the problem of extracting the Xpaths. Hope that makes it clearer, Hedley -- Hedley Stewart Finger 28 Regent Street Camberwell VIC 3124 Australia Tel. +61 3 9809 1229 Mobile +61 412 461 558, E-mail <mailto:hfinger@handholding.com.au>