Bug 32950 - support "xslt-param" processing instruction for XSLT parameters
Summary: support "xslt-param" processing instruction for XSLT parameters
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-26 09:34 PST by Marcus Better
Modified: 2010-01-22 15:28 PST (History)
2 users (show)

See Also:


Attachments
test document passing parameter via "xslt-param" (143 bytes, text/xml)
2009-12-26 09:35 PST, Marcus Better
no flags Details
style sheet to go with the test document (370 bytes, text/xml)
2009-12-26 09:37 PST, Marcus Better
no flags Details
Importing stylesheet with parameter value. (207 bytes, application/xml)
2010-01-22 15:27 PST, Alex Milowski
no flags Details
Imported stylesheet (354 bytes, text/xml)
2010-01-22 15:27 PST, Alex Milowski
no flags Details
Example Document using Importing Example (103 bytes, application/xml)
2010-01-22 15:28 PST, Alex Milowski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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