Subject: RE: [xsl] xsl transform issue From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Wed, 23 Feb 2005 16:17:35 -0000 |
<xsl:for-each select="./win-registry-data/data"> <xsl:choose> <xsl:when test="./win-registry-data[@data] = 'netlogon'"> If the context node outside the for-each has a child called win-registry data, then it's unlikely (given your XML) that the context node inside the for-each will have one too. Also, I don't see any attributes called data - only elements. And "./" at the start of a path expression is completely redundant. And your xsl:when and xsl:otherwise branches seem to be identical. And I dont understand "certain keys will be fall in ti the first part of the choose". So I'm afraid I can't help you very much. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: dan sherman [mailto:h8_bsod@xxxxxxxxx] > Sent: 23 February 2005 16:06 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] xsl transform issue > > This does not work, I want test for the data field, > certain keys will be fall in ti the first part of the > choose, other will fall into the otherwise part. Maybe > someone can point me in the right direction. > > Thanks, > DJ > > > ----------xsl below----------------- > <xsl:if test="name = 'NullSessionPipes'"> > <xsl:for-each select="./win-registry-data/data"> > <xsl:choose> > <xsl:when > test="./win-registry-data[@data] = 'netlogon'"> > > <td><xsl:value-of > select="./win-registry-data/data"/></td> > </xsl:when> > <xsl:otherwise> > <td ><xsl:value-of > select="./win-registry-data/data"/></td> > </xsl:otherwise> > </xsl:choose> > </xsl:for-each> > </xsl:if> > > > --------------xml below ---------------------- > > > <win-registry-key><name>HKEY_LOCAL_MACHINE\System\CurrentContr > olSet\Services\LanManServer\Parameters</name><exists>true</exists> > > <win-registry-value><name>NullSessionPipes</name><exists>true< > /exists><type>REG_MULTI_SZ</type> > > <win-registry-data><data>COMNAP</data></win-registry-data> > > <win-registry-data><data>COMNODE</data></win-registry-data> > > <win-registry-data><data>SQL\QUERY</data></win-registry-data> > > <win-registry-data><data>SPOOLSS</data></win-registry-data> > > <win-registry-data><data>netlogon</data></win-registry-data> > > <win-registry-data><data>lsarpc</data></win-registry-data> > > <win-registry-data><data>samr</data></win-registry-data> > > <win-registry-data><data>browser</data></win-registry-data> > </win-registry-value> > </win-registry-key> > > > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl transform issue, dan sherman | Thread | RE: [xsl] xsl transform issue, dan sherman |
[xsl] xsl transform issue, dan sherman | Date | Re: [xsl] xsl transform issue, David Carlisle |
Month |