xsl-list
[Top] [All Lists]

RE: [xsl] Use same xml file with different XSL stylesheets

2007-03-30 10:01:15
Yes, probably this is what would work best.

Using the processor to point to both the stylesheet and base xml document and then create the html, without creating the file with "<?xml-stylesheet?>"

The other solution was to create base_01.xml and base_02.xml with a container inside that point to the base xml file and then use the stylesheet to load it, using document();

Something like:

--base_01.xml--
<?xml-stylesheet ....?>
<foo>
 <file value="base.xml" />
 ...
</foo>
----------------------

--stylesheet.xsl--
for-each foo/file
  PROCESS FILE WITH document(@value)/...
/for-each
-----------------------

Thanks

From: "Michael Kay" <mike(_at_)saxonica(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] Use same xml file with different XSL stylesheets
Date: Wed, 28 Mar 2007 20:57:29 +0100

> I have two different xsl stylesheets that will be applied to
> the same set of xml documents.

In this situation you really don't want to be using the <?xml-stylesheet?>
processing instruction.

Every XSLT processor has some kind of API that allows you to nominate the
XML source document and the XSLT stylesheet separately.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
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>
--~--




--~------------------------------------------------------------------
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>
--~--