Re: [xsl] xsl for apply PI to xml file

Subject: Re: [xsl] xsl for apply PI to xml file
From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx>
Date: Wed, 30 Dec 2009 17:36:15 +0100
Hi,

> I would like to ask which is the most simple and elegant
> manner to apply, by using a xsl stylesheet, ...
> ...to an xml file, in order to have the referred xsl stylesheet applied
> in the browser.

here is the answer to above reduced question.
Applying a transformation to an XML file in a browser is normally done by
xml-stylesheet processing instruction, see
"Associating Style Sheets with XML documents"
http://www.w3.org/TR/xml-stylesheet/


<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="
/exist/rest//db/xsltforms/xsltforms.xsl"?>
<data>
...
...
</data>


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Developer, XML Compiler
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


                                                                           
             Claudius                                                      
             Teodorescu                                                    
             <claud108@xxxxxxx                                          To 
             om>                       xsl-list@xxxxxxxxxxxxxxxxxxxxxx     
                                                                        cc 
             12/30/2009 04:27                                              
             PM                                                    Subject 
                                       [xsl] xsl for apply PI to xml file  
                                                                           
             Please respond to                                             
             xsl-list@xxxxxxxx                                             
              lberrytech.com                                               
                                                                           
                                                                           




Hi,

I would like to ask which is the most simple and elegant
manner to apply, by using a xsl stylesheet, an processing instruction
as follows
<xsl:processing-instruction
name="xml-stylesheet">href="/exist/rest//db/xsltforms/xsltforms.xsl"
type="text/xsl"</xsl:processing-instruction>
to an xml file, in order to have the referred xsl stylesheet applied in the
browser.

Thank you,
Claudius Teodorescu

Current Thread