This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
sub-documents with their own stylesheets
- To: xsl-list at mulberrytech dot com
- Subject: sub-documents with their own stylesheets
- From: Ken MacLeod <ken at bitsko dot slc dot ut dot us>
- Date: 18 Jul 2000 14:33:08 -0500
- Reply-To: xsl-list at mulberrytech dot com
newbie alert! I'm just starting into XSL. In researching this
problem I've looked at the tutorials listed on the W3C page and in the
XSL FAQ, read through the examples in the FAQ surrounding
document(), and talked with one XSL guru (thanks Eric!).
The question is: can I use XSL alone to take two XML docs, each with
their own stylesheet, and merge them in to one output document.
A concrete example: I want to create an XHTML page with two areas from
the two seperate XML docs:
+-------------+
| TOP |
| +---+ +---+ |
| | A | | B | |
| +---+ +---+ |
+-------------+
A.xml has A.xsl, B.xml has B.xsl. Both transform well standalone and
I _could_ use an external tool to insert them into TOP.xhtml.
What I want to do, though, is create a TOP.xsl that can replace
placeholder elements in TOP.xhtml with content from A and B
transformed by their respective stylesheets.
Two possible solutions (thanks Eric!), as long as I have complete
control over all the schemas and stylesheets, are:
1) use unique namespaces, xsl:include, document(), and just apply
all the styling in one swell foop.
2) do roughly the same, but using "mode"
Both of these require a lot more control and hand-holding in the
stylesheets than I'd prefer, and would make reusing other's
stylesheets somewhat more difficult.
Is this something I can do directly within XSL, or should I go ahead
and merge them externally?
Thanks,
-- Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list