xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elaine Brennan <elaine.bren...@worldnet.att.net>
Subject Re: multiple XSL stylesheet in XML ?
Date Wed, 29 Mar 2000 18:54:38 GMT
At 05:49 PM 3/29/00 (+0200), Benoit Fouche wrote:
>Hi !
>Can I multiple <?xml-stylesheet href="test.xsl" type="text/xsl"?> 
>declaration in a XML document ?
>And How, and what are the fields that determine what stylesheet to use ?

Yes, you can.  You do so using two of the pseudo-attributes available on 
the xml-stylesheet processing instruction: "title" and "alternate":

<?xml-stylesheet alternate="yes" title="compact" href="small-base.css"
<?xml-stylesheet alternate="yes" title="compact" href="small-extras.css"
<?xml-stylesheet alternate="yes" title="big print" href="bigprint.css"
<?xml-stylesheet href="common.css" type="text/css"?>

You can also use the "media" pseudo-attribute to specify that a particular 
stylesheet is meant for use with a particular presentation medium: paper, 
hand-held, etc.

Browsers and other tools ("user-agents") are supposed to allow the end-user 
to select which stylesheet to use when multiple stylesheets are associated 
with a particular document.



Elaine M. Brennan
Principal XML Technologist
Inferdata Corporation

View raw message