[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Use same xml file with different XSL stylesheets

Subject: Re: Use same xml file with different XSL stylesheets
From: Steve <subsume@xxxxxxxxx>
Date: Fri, 30 Mar 2007 13:05:19 -0400
Re:  Use same xml file with different XSL stylesheets
Can someone explain to me how this method and its results vary from a
simple transform, import, or use of document()?

-Steve

On 3/30/07, Ignacio Garcia del Campo <igarc001@xxxxxxxxxxx> wrote:
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@xxxxxxxxxxxx>
>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
>Subject: RE:  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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.