Hi M. David,
Thanks for your reply and example - I look forward to seeing your site! (and
I'm glad that I could provide some input to your site, even if in a wholly
passive manner... :-)
I definitely learned some things from your response (and am still contemplating
a few of them) - I especially like the possibilites associated with building a
temporary tree and of using the mode attribute of the select and match
conditions - that's a new technique to me and looks to have a lot of very cool
uses! Are there any concerns/drawbacks of taking this type of approach when
working with large sets of data? (ie, would memory/resource use possibly be a
problem?)
As regards the original problem itself, what I'm trying to do is to provide a
generic stylesheet that users can apply to any set of data resulting from a
particular type of database query - I'm using Oracle 9.1, which allows
hierarchical relational queries (ie, the relational data can be meaningfully
represented hierarchically, via level and heritage (specifically, parent)
data), and which allows xml-conversion of relational data, but that
unfortunately 'flattens' the hierarchical relational data in the process of
converting that relational data to XML. So, in order to do this, I need to
have the 'utility' elements that I identified (LEVEL_, ROWID_ and PARENTROWID_
- that establish the depth/heritage in the hierarchy [sidebar: in all
actuality, I just need to identify those that are top-level and those that
aren't - which now occurs to me that I could do simply based on the presence/abs
ence of a PARENTROWID_ element - but Oracle's CONNECT BY query produces a
'level' value t!
hat fits the bill nicely] and then I want to be able to generically
're-constitute' the hierarchical nature of _any_ data that is generated via the
CONNECT BY (herarchical relational) query (but that is subsequently squashed
flat by the XML conversion process). Thus, I can't reference 'data' elements
in the stylesheet (like NODE, SRCD, etc), as I don't know what those will
actually be in the generic/runtime use of the stylesheet - I can only rely on
the presence of these 'utility' elements that I have predicated as requirements
for anyone wishing to use this 'reconstitution' service.
So, any further info/advice that you can provide in the context of this
generic/service approach to the problem would be most welcome!
Thanks for the help!!
Jim