> With the example:
>    sabcmd sheet.xsl sheet.xml sheet.htm "$use_defaults=1" 
> can someone email an example XSL where $use_defaults is used in, for
> example, a xsl:when conditional?

I've been trying this myself tonight.  Can't get the parameter form to work,
but I just got the named-buffer approach to work.

Basically, I call sablotron:
  sabcmd sheet.xsl sheet.xml "myType=<T>Full</T>"

and in sheet.xsl, I have:
 ....
 <xsl:variable name="type">
    <xsl:value-of select="document('arg:myType')/T" /> 
 </xsl:variable>

 <xsl:choose>
 <xsl:when test="$type='JobHist'">
 ....

This looks up the "arg:' URI (sablotron named buffer), for the buffer called
"myType", and finds the "<T>" element within it.  The value of that is
stored in the xsl:variabel "type", which is then used in the when test.

Unfortunately, it's a bit uglier than I'd like on the command line.  If
anyone can get "$myType=Full" (or even "$myType='Full'") to work, I'd love
to use that construct instead...


Hope this helps!


david.

 

Reply via email to