Connecting Tech Pros Worldwide Help | Site Map

cascading xsl xslt transformation

daniele74@libero.it
Guest
 
Posts: n/a
#1: Mar 28 '06
Hy,
I want ask you this question.
I have two schema file schema1.xsd and schema2.xsd. then I have a
stylesheet transformation style2.xsl that show in a browser an xml file
that has schema2.xml as schema. moreover I have an xslt tranformation
that map schema1.xsd in schema2.xsd (schema1TOschema2.xslt).

so the question is: it is possible to use style2.xsl to view xml file
that has schema1 as schema??
with instractions similar to this example?
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="style2.xsl"?>
<?xml-stylesheet type="text/xsl" href="schema1TOschema2.xslt"?>
<my:doc xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:schemaLocation="schema1.xsd" ............>

<data>
data with schema1.xsd data
................
</data>

thank you
Daniele

Martin Honnen
Guest
 
Posts: n/a
#2: Mar 29 '06

re: cascading xsl xslt transformation




daniele74@libero.it wrote:

[color=blue]
> so the question is: it is possible to use style2.xsl to view xml file
> that has schema1 as schema??
> with instractions similar to this example?
> <?xml version="1.0" encoding="utf-8"?>
> <?xml-stylesheet type="text/xsl" href="style2.xsl"?>
> <?xml-stylesheet type="text/xsl" href="schema1TOschema2.xslt"?>[/color]

You can't chain transformations by using two xml-stylesheet processing
instructions in the same document. In theory it could work to have one
processing instruction in the input XML and then produce a second XML
with the second processing instruction but I don't think browser support
applying that second transformation automatically.
It should however be possible to chain transformations by using the API
an XSLT processor exposes.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Closed Thread