Next in thread → Next in month →

Re: [docbook-apps] rootid-selection does not work for me

From
Jirka Kosek <>
Date
2003-05-06T07:33:19+00:00
ID
Thread
Re: [docbook-apps] rootid-selection does not work for me
Bob Stayton wrote:

>><xsl:param name="rootid" select="SimpleDataTypes"/>
>>
>>but it always
>>formats the entire XML instance.
>>What's wrong here?
> 
> 
> The id string needs to be in single quotes when used
> in a select attribute.

Just to be more explicit: value of attributes must be also enclosed in 
XML. So you will end up with quite strange but completely correct 
doubled quotes:

<xsl:param name="rootid" select="'SimpleDataTypes'"/>

or

<xsl:param name="rootid">SimpleDataTypes</xsl:param>

If you don't surround string literal with ' in XPath expression you 
asking XSLT processor for selecting elements with given string as their 
name. So

<xsl:param name="rootid" select="SimpleDataTypes"/>

assigns to $rootid nodeset containing elements named SimplaDataTypes. Of 
course there are no such elements in your DocBook instance.

				Jirka

-- 
-----------------------------------------------------------------
   Jirka Kosek  	
   e-mail: 
   http://www.kosek.cz
Next in thread → Next in month →