- Does anybody agree/disagree to my classification?
Oh, I expect so:-)
It isn't always clear whether a particular XML file is data or document
centric for a start. In particular many basically "document" oriented
formats that support mixed data have "data centric" subsections (eg
lists of bibligraphies or metadata sections) I think XSLt was
intentionally designed to handle both these cases.
but the programming style is more imperative (for-each)
than template based (apply-template).
I know what you mean here but the distinction between imperative and
declarative programming styles doesn't really coincide with using or not
using apply-templates. xsl:for-each is (always) equivalent to using
apply-templates with a unique mode, and a single template in that mode,
so for-each is just a syntactic shorthand for one restricted usage of
apply-templates, not a completely different paradigm that one can make
hard and fast rules about.
- How can I handle use case 3)? To my mind it would be best to convert a
data-centric XML into a well structured documen-centric XML and then
apply a XSLT stylesheet.
I don't understand this question. Or at least, I don't understand the
proposed answer. How would you do the conversion that you mention?
If you use XSLT then you would presumably need a stylesheet of your type
3, so this solution appears to be circular?
That said XSLT2 does make certain data-document translations easier,
specifically the grouping constructs and the more extended range of
functions such as min() and max().
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--