Subject: Re: [xsl] passing variables to a stylesheet From: "cutlass" <cutlass@xxxxxxxxxxx> Date: Mon, 24 Sep 2001 15:27:55 +0100 |
----- Original Message ----- From: "Eric Smith" <Eric.Smith@xxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Monday, September 24, 2001 3:16 PM Subject: Re: [xsl] passing variables to a stylesheet > I want to match all tags that have an attribute called 'surpress' whose value is > not 'short'. So the following seems correct to me: > <xsl:template match="sub[@surpress != 'short']"> > only problem is that it also surpresses nodes where there is no > attribute called 'supress' *[boolean(@suppress) = 'yes' and @surpress !='short'] something like this, u must test for the existance of @suppress, there are more optimal ways of doing this, also u may need to add namespace handling if u have mixed namespaces; which i leave to u. > How do I get all nodes to print except those with attribute > 'supress' not equalt to 'short'? didnt u just say this ? > > I would like to us eXPAth and not xsl:if > also I would really like to make this a global condition if posisble > and not set it in each Xpath expression. use in template or first use <xsl:copy select="*[boolean(@suppress) = 'yes' and @surpress !='short']"/> or prob better yet <xsl:variable name="thevar" select="*[boolean(@suppress) = 'yes' and @surpress !='short']"/> and use $thevar variable for further processing. cheers, jim fuller > > Thanx > -- > Eric Smith - See mail header for processors > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] passing variables to a st, Eric Smith | Thread | [xsl] XPath Question (correction to, Eric Smith |
Re: [xsl] passing variables to a st, Eric Smith | Date | [xsl] XPath Question (correction to, Eric Smith |
Month |