xslt-param processing instruction - pass a value from xml document to xsl stylesheet -


im doing uni assignment , cannot (for life of me) find information online "xslt-param" xml processing instruction. there information "xsl:param" not same thing.

basically i've got xml document want transform html, on client side. assignment requires me use "xslt-param" send value stylesheet, this:

<?xml version="1.0"?> <?xml-stylesheet href="http://blah/assign/pass.xsl" type="text/xsl"?> <?xslt-param name="user_entry" select="superman"?> <root>     content </root> 

and stylesheet receive this:

<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform">  <xsl:param name="user_entry"/>      <xsl:template match="/">         <html>             <head>                 <meta charset = "utf-8" />                  <title>assignment</title>             </head>              <body bgcolor="orange">                  <h3> result...</h3>                  <p>                     howdy.                     entered <xsl:value-of select="$user_entry" />                 </p>                  <!--xsl:apply-templates/-->              </body>          </html>      </xsl:template>  </xsl:stylesheet> 

most of stuff working...

i cannot find information online (or supervisor) correct technique using "xslt-param"

its technique doesn't exist. know it?

im aware approach never used in real world. gotta assignment.

does know "xslt-param" documented / explained via tutorial / officially specified?

thanks

as far aware processing instruction xslt-param supported mozilla browsers, see https://developer.mozilla.org/en-us/docs/xslt/pi_parameters documentation.

i not sure whether other browsers support that.

so example <?xslt-param name="user_entry" select="superman"?> think either want <?xslt-param name="user_entry" value="superman"?> (where assign string value superman) or want use xpath expression select <?xslt-param name="user_entry" select="//superman"?> select elements named superman in xml input document or <?xslt-param name="user_entry" select="'superman'"?> different way assign string value superman parameter.

your original sample <?xslt-param name="user_entry" select="superman"?> not make sense select element named superman root element of input document; input sample has root element named root.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -