OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK-APPS: double enclosure?


> From: Dave Pawson <daveP@dpawson.freeserve.co.uk>
> 
> At 21:06 08/08/2001, Jirka Kosek wrote:
> 
> 
> >  don't forget that when specifying string
> >literals in XSLT you must double enclose them:
> >
> ><xsl:param name="htmlhelp.chm" select="'mycoolbook.chm'"/>
> 
> Curiosity, what are the principles of either double
> enclosure or not, as used in the stylesheets?
> 
> Must admit I've never been sure.
> 
> Is it simply to get a string literal, or is there
> more to it?
> 
> In particular to select/ignore, such as in param.xsl,
> where numbers are used?

It isn't numbers you have to watch out for, it is element names.
In the 'select' and 'test' attributes used in various
XSL elements, the attribute value is an XSL expression, which
means an XPath.  In XPath, unquoted strings are taken
to mean element names.  So:

  <xsl:param name="thistitle" select="title"/>

selects the <title> child of the current element.  And

  <xsl:param name="htmlhelp.chm" select="mycoolbook.chm"/>

[without quoting the filename]
means select all the child elements named <mycoolbook.chm>
relative to the current node.  It is a valid expression,
which yields no nodes in a DocBook document since that
is not a valid element name.  You have to quote such strings
in 'select' and 'type' attributes so they aren't
interpreted as element names in the expression.

I like your concept of an 'ignore' attribute in opposition
to a 'select' attribute.  That could lead to some
interesting stylesheet logic.  8-)

bobs
Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC