cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Pattison" <>
Subject dynamic <xsl:import>
Date Mon, 15 Apr 2002 22:12:32 GMT
Is it possible to have the href of an <xsl:import> be dynamic?

I have an xml document of data.  This document has a <layout> tag.  I want
to use that value to determine which file is used as the stylesheet.  Is
this possible?  I know my syntax is somewhat right because it works when I
hardcode in a value.  My source is listed below.



Here is my xml document:

<?xml version="1.0"?>
	<title>Simple Layout</title>
  	<para>This is a document using a simple layout.</para>

Here is my 'dynamic' stylesheet:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"

	<xsl:import href="{//layout}"/>


I've also tried it like this:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"

	  <xsl:attribute name="href">
	    <xsl:value-of select="layout">


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message