Subject: Re: [xsl] handling of xsl-Variable in formatting text From: "Dirk Naujoks naujoks@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 15 Apr 2016 13:30:02 -0000 |
It would help to give a complete executable stylesheet (preferably with irrelevant detail removed) and a source document, plus expected output, so people can run it for themselves and debug it for you. As it is, we can only stare at the code - you haven't even told us what the failure symptoms are ("it doesn't work" isn't very helpful...)
One thing I would suggest it to cut out the whitespace in the variable value, which at best is unnecessary and at worst could cause downstream processing to produce the wrong results:
<xsl:choose> <xsl:when test="@pnr != '7000'">normal</xsl:when> <xsl:otherwise>bold</xsl:otherwise> </xsl:choose>
Not being able to see a source document, I don't know if it's relevant, but you should be aware of the exact meaning of "@pnr != '7000'" - it means "if the pnr attribute exists and has a value other than '7000'. Writing "not(@pnr = '7000')" has a different meaning when the attribute is absent.
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] handling of xsl-Variable , Michael Kay mike@xxx | Thread | Re: [xsl] handling of xsl-Variable , Michael Kay mike@xxx |
Re: [xsl] handling of xsl-Variable , Michael Kay mike@xxx | Date | Re: [xsl] handling of xsl-Variable , Michael Kay mike@xxx |
Month |