Altova Mailing List Archives


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

From: Steve <subsume@--------->
To:
Date: 3/28/2007 3:49:00 PM
Are you looking for the document() function?



--S



On 3/28/07, Ignacio Garcia del Campo <igarc001@xxxxxxxxxxx> wrote:
Hello all,



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

Is there a way to create references to the BASE xml files to save space?



Let's say my xml file is 100 lines, if I want to apply the two XSL
stylesheets, I need to create two files base_01.xml and base_02.xml with 101
lines in each.

The extra line adds the reference to the XSL stylesheet to be used.



I would like to know if it is possible to create the files with just a few
lines, something like this:

------------------
base_01.xml
------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet1.xsl" ?>
<?XML REFERENCE TO BASE.XML TO BE PROCESSED ?>

------------------
base_02.xml
------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheet2.xsl" ?>
<?XML REFERENCE TO BASE.XML TO BE PROCESSED?>


Thank you.

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.