cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morrison John <john.morri...@experian.com>
Subject RE: Associating several stylesheets with one XML document
Date Tue, 03 Oct 2000 10:43:52 GMT
Or you could create something like....

---------------- data.xml -------------------------

<link_data>

<section name="Search Engines">
	<link name="Raging" href="http://www.raging.com/"/>
	<link name="Netscape" href="http://www.netscape.com/uk/">
		<local country="UK" href="http://www.netscape.com/uk/"/>
		<local country="USA" href="http://www.netscape.com/"/>
	</link>
	<link name="Yahoo" href="http://www.yahoo.co.uk/">
		<local country="UK" href="http://www.yahoo.co.uk/"/>
		<local country="USA" href="http://www.yahoo.com"/>
	</link>
</section>

</link_data>

---------------- xml1.xml -------------------------

<?xml version="1.0"?>

<?cocoon-process type="xinclude"?>
<?xml-stylesheet href="xml1.html.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>

<page xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
	<links xinclude:parse="xml" xinclude:href="data.xml"/>
</page>

---------------- xml2.xml -------------------------

<?xml version="1.0"?>

<?cocoon-process type="xinclude"?>
<?xml-stylesheet href="xml2.html.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>

<page xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
	<links xinclude:parse="xml" xinclude:href="data.xml"/>
</page>

---------------------------------------------------

where data.xml is never accessed directly (it's not valid xml anyway!) only included.

> -----Original Message-----
> From: Brian May <bam@snoopy.apana.org.au> 
> Sent: 03 October 2000 9:39
> To: bam@snoopy.apana.org.au; cocoon-dev@xml.apache.org
> Subject: Re: Associating several stylesheets with one XML document
> 
> 
> >>>>> "Richard" == Richard Korthuis <R.Korthuis@telecats.nl> writes:
> 
>     Richard> Hello, I have a question: I would like to access a XML
>     Richard> document using different stylesheets (XSL). For example
>     Richard> one time I would like to use one.xsl but some other time
>     Richard> I would like to use two.xsl on the same XML document. Is
>     Richard> this possible? If so, how can I tell the
>     Richard> server/XMLdocument which XSL it should use?  I am using:
>     Richard> Apache Web server 1.3.12 Cocoon 1.8 I am looking forward
>     Richard> to hearing from you at your earliest convenience.
> 
> I think the only option is to wait for C2.
> -- 
> Brian May <bam@snoopy.apana.org.au>
> 
> 



=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

Mime
View raw message