xsl-list
[Top] [All Lists]

[xsl] question on xml-stylesheet processing instruction for browsers

2009-05-19 06:17:44

Hello,

is it possible to chain execution of stylesheets if opening eg.
"http://..../x.xml"; in a web browser?

By the pieces below "x.xml" will execute stylesheet "x.xsl" in the browser
and replace the processing
instruction's 'href="x.xsl" ' by 'href="y.xsl" ' in the generated output.

What appears in the browser is the output of execution of stylesheet
"x.xsl" only, no execution of "y.xsl".
If chaining stylesheet execution is possible, what is missing?


$ cat x.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="x.xsl"?>
...

$ cat x.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="/processing-instruction('xml-stylesheet')">
  <xsl:processing-instruction name="xml-stylesheet">
    <xsl:value-of select="substring-before(.,'href=')"/>
href="y.xsl"</xsl:processing-instruction>
</xsl:template>
...


Mit besten Grüßen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Erich Baier
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>