This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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: jirka@kosek.cz
  http://www.kosek.cz

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]