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

Re: [XSL] XSL Browser Integration

Subject: Re: [XSL] XSL Browser Integration
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 14 Sep 2007 03:38:07 +0200
Re:  [XSL] XSL Browser Integration
M. David Peterson wrote:
On Thu, 13 Sep 2007 16:16:55 -0600, Michael Kay <mike@xxxxxxxxxxxx> wrote:

http://developer.mozilla.org/en/docs/XSLT:PI_Parameters

But these are separate PI's. And to be quite honest, I've never understood the justification of the xslt-param PI. What does,
<?xslt-param name="size" select="2"?>
... buy me that I can't get with,
<xsl:param name="size" select="/foo/param/size"/>
, the second of which is cross-browser compatible?



At anytime when a browser invents a new thing, it is not cross browser compatible. Nobody uses XHR in the early days: too complex was the comment. Now it is one the hottest new technologies (opinion vary).


Ok, this is not so much of a new hot technology. It is a minor feature. But we are talking about inclusion through parameters. It is a convenience method. You have your xsl:param inside your XSLT file which is easier to address then something like document('$current-url')/my:param and declare the necessary extension-element-prefixes.

Depending on your server side environment, it is likely that you have one source for XML. This way you do not need to change this XML and you can still add metadata through parameters.

But of course, the whole design concept around PI / XSLT is kind a bad. It is sometimes (very sometimes) convenient to test the layout of your transformation in a browser. And if you are accustomed to XML spy you probably use it more often (because it does so for you).

If a server file looks like this SSI file (probably won't compile, but you get the idea)
<?xslt-param name="date" value="<!--#echo var='DATE_LOCAL' -->"?>
<?xslt-param name="ip" value="<!--#echo var='IP_REFERER' -->"?>
<?xml-stylesheet mystylesheet.xslt ?>
<!--#include file="some-generated-xml-file.xml" -->


In this scenario it is unlikely that it is handy to change the xml info on-the-fly, because that means re-parsing in a system where you already include it via some SSI call. In that use case, it can be handy to simply extend your SSI file with some dynamic parameters, or a CGI inclusion.

But all this is, indeed, fairly useless unless other browsers implement this too.


Cheers, -- Abel Braaksma

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-2011 All Rights Reserved.