I'd like software that reads a RelaxNG grammar and writes out a list
of all the possible paths (through parents & children element nodes
only) to each leaf node.
I.e., I'd like to see a list of all paths through the tree from the
root to a leaf, stepping only to child elements. E.g.
/TEI/teiHeader/fileDesc/titleStmt/title
/TEI/teiHeader/fileDesc/titleStmt/title/abbr
/TEI/teiHeader/fileDesc/titleStmt/title/sic
/TEI/teiHeader/fileDesc/titleStmt/title/orig
/TEI/teiHeader/fileDesc/titleStmt/title/[text]
etc. I wouldn't mind getting intermediate steps like
/TEI
/TEI/teiHeader
/TEI/teiHeader/fileDesc
/TEI/teiHeader/fileDesc/titleStmt
but they're not what I'm currently concerned with.
I was just starting to toy with what kind of XSLT I would need to
write to do this, when a "don't reinvent the wheel" thought struck me
(especially since my XSLT is barely good enough to invent a square
:-). Someone must have written a utility, XSLT or otherwise, that
does this already, no?
Does anyone know of or have any tool that will do this?
Thanks.