xsl-list
[Top] [All Lists]

Re: generate-d( ) not working

2003-07-01 14:00:51




  <xsl:template name="Link" match="//HSS">
you don't want to start a match pattern with // (it doesn't do anything
except change the default priority, it doesn't change the nodes matched)

        <xsl:for-each select=".">
. only selects one node (the current one) so this for-each is iterating
over a list of length 1. Your stylesheet would act in teh same way if
you removed this.
                <img src="texticon.gif"><a href="#{generate-id(HSS)}">
Yout template is matching HSS nodes, and that HSS element is therefore
selecting HSS children of HSS nodes. Your sample input suggested that
HSS was empty. You want the current node not its HSS child,
generate-id(.)


  <xsl:template match="//HSS">
this template matches the same nodes as the first template, with the
same priority, so this is an error, your processor may recover by 
excuting one of them but the other will never be executed.

It's hard to suggest what your match patterns should be as you didn't give
any indication of the transform you are trying to do.

David

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list