Bug 32950

Summary: support "xslt-param" processing instruction for XSLT parameters
Product: WebKit Reporter: Marcus Better <marcus>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: alex, ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
test document passing parameter via "xslt-param"
none
style sheet to go with the test document
none
Importing stylesheet with parameter value.
none
Imported stylesheet
none
Example Document using Importing Example none

Description Marcus Better 2009-12-26 09:34:08 PST
Firefox supports a handy mechanism for passing parameters to style sheets included with the xml-stylesheet XML processing instruction:

  <?xslt-param name="msg" value="Hello!"?>
  <?xml-stylesheet type="text/xsl" href="style.xsl"?>

This is described in more detail here:
  https://developer.mozilla.org/en/XSLT/PI_Parameters
Comment 1 Marcus Better 2009-12-26 09:35:42 PST
Created attachment 45511 [details]
test document passing parameter via "xslt-param"
Comment 2 Marcus Better 2009-12-26 09:37:20 PST
Created attachment 45512 [details]
style sheet to go with the test document

The document alerts "Hello" when loaded in Firefox, but shows an empty alert with WebKit (Google Chrome 4.0.266.0 on Linux).
Comment 3 Alex Milowski 2010-01-22 15:26:20 PST
While this is an interesting "feature", I don't see any common standardization of this as a feature.   You can accomplish the same task by importing the stylesheet and setting the parameters explicitly in the importing stylesheet.

I've attached an example.
Comment 4 Alex Milowski 2010-01-22 15:27:23 PST
Created attachment 47234 [details]
Importing stylesheet with parameter value.
Comment 5 Alex Milowski 2010-01-22 15:27:55 PST
Created attachment 47235 [details]
Imported stylesheet
Comment 6 Alex Milowski 2010-01-22 15:28:27 PST
Created attachment 47237 [details]
Example Document using Importing Example