Subject: Re: [xsl] Use same xml file with different XSL stylesheets|
From: Steve <subsume@xxxxxxxxx>
Date: Fri, 30 Mar 2007 13:05:19 -0400
Can someone explain to me how this method and its results vary from a simple transform, import, or use of document()?
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();
--base_01.xml-- <?xml-stylesheet ....?> <foo> <file value="base.xml" /> ... </foo> ----------------------
--stylesheet.xsl-- for-each foo/file PROCESS FILE WITH document(@value)/... /for-each -----------------------
>From: "Michael Kay" <mike@xxxxxxxxxxxx> >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> >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/