NEW 32950
support "xslt-param" processing instruction for XSLT parameters
https://bugs.webkit.org/show_bug.cgi?id=32950
Summary support "xslt-param" processing instruction for XSLT parameters
Marcus Better
Reported 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
Attachments
test document passing parameter via "xslt-param" (143 bytes, text/xml)
2009-12-26 09:35 PST, Marcus Better
no flags
style sheet to go with the test document (370 bytes, text/xml)
2009-12-26 09:37 PST, Marcus Better
no flags
Importing stylesheet with parameter value. (207 bytes, application/xml)
2010-01-22 15:27 PST, Alex Milowski
no flags
Imported stylesheet (354 bytes, text/xml)
2010-01-22 15:27 PST, Alex Milowski
no flags
Example Document using Importing Example (103 bytes, application/xml)
2010-01-22 15:28 PST, Alex Milowski
no flags
Marcus Better
Comment 1 2009-12-26 09:35:42 PST
Created attachment 45511 [details] test document passing parameter via "xslt-param"
Marcus Better
Comment 2 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).
Alex Milowski
Comment 3 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.
Alex Milowski
Comment 4 2010-01-22 15:27:23 PST
Created attachment 47234 [details] Importing stylesheet with parameter value.
Alex Milowski
Comment 5 2010-01-22 15:27:55 PST
Created attachment 47235 [details] Imported stylesheet
Alex Milowski
Comment 6 2010-01-22 15:28:27 PST
Created attachment 47237 [details] Example Document using Importing Example
Note You need to log in before you can comment on or make changes to this bug.