[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

client side style sheets?

Subject: client side style sheets?
From: Paul Bleisch <pbleisch@xxxxxxxxxxxxxxxx>
Date: Mon, 29 Jan 2001 22:00:02 -0600
side style
I am attempting to build a system in which a server generates 
XML data to which the client side then applies an XSLT. I'd 
like to use IE + MSXML3 as the client and have the client-
side XSLT generate HTML.  The server is a very tiny embedded
HTTP server that dispatches to "response objects" that generate
the XML output.

The problem I've run into is that I can't seem to find a nice
way to associate (from the client) the transform with the 
source data (generated on the server).

So far I've tried:

a) Give up and have the server insert a stylesheet processing
   command into the server output.

b) Have the client specify the XSLT to use with a URL query
   string parameter (i.e. someurl?xslt=foo.xsl ).

c) Create an xslt that transforms a document of the following
   form to the desired output:

   <xdbpage source="http://server.com/someresource.xml" 
            display="file://path/to/xslt/display.xsl" />

   Then the generic XSLT (display.xsl) would then use 
   document() to pull in the XML (in @source) and apply 
   the xslt (in @display):

  <xsl:template match="xdbpage">
    <xsl:processing-instruction name="xml-stylesheet">
	 type="text/xsl" 
	 href="<xsl:value-of select="@display" />"
    </xsl:processing-instruction>
    <xsl:apply-templates select="document(@source)/*" />
  </xsl:template>

  Users can then create these very simple XML files and 
  simply open them in IE (assuming MSXML3 is installed 
  in replace mode).

I don't like a) because it really defeats the purpose of this
tool (remote debugging where the embedded web server simply 
delivers data and the user defines how to view it).  
b) is very painful because it requires modifying all of the 
XML generation code on the serverside to output the correct 
stylesheet reference.  The way the server side is architected 
(and written right now) would make this difficult.  

I've tried c) but cannot get display.xsl to correctly transform
the source document.  It is retrieving the source document
(I can insert a breakpoint in the web server request code.)
but the output is only the generated style sheet reference.
and no actual XML output.  I think that this is actually what
display.xsl I have above is supposed to do, but I cannot find
a way to change both the input node tree *and* the current
transform/stylesheet.

Two questions...

1) Are there standard/easy ways to allow users to apply/associate
   XSL transforms to/with XML data from some server source?

2) How do I correctly do c) above?

Thanks,
Paul



   
   

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.