This is the mail archive of the xsl-list@mulberrytech.com 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: Expression Logic Problem


hi,

Charles Knell wrote:
Let me recommend Purple Technology's XPath Explorer (http://sourceforge.net/projects/xpe/)

I copied your XML to a file, opened it in XPath Explorer, and determined
this XPath in a few seconds.:
  //record/field/../field[1]

or in expanded form:
  /descendant-or-self::node()/child::record/child::field/parent::node()/child::field[1.0]
this looks hideous


This may not be the most efficient XPath, but it is a good starting point.


I just noticed a cut & paste error in my code. I had:

<xsl:if test="not(@id=preceding-sibling::field[1]/@id)">
>
> <!-- perhaps use a key here? -->
> <xsl:value-of
> select="$/document/configure/server/resultfield[@id=$id]"/>
> <xsl:text>: </xsl:text>
> </xsl:if>

I was going to use a variable to save line space, but then switched back but did not get the '$.' It is probably obvious but it should be:

<xsl:if test="not(@id=preceding-sibling::field[1]/@id)">
>
> <!-- perhaps use a key here? -->

<xsl:value-of
select="/document/configure/server/resultfield[@id=$id]"/>

> <xsl:text>: </xsl:text>
> </xsl:if>

-Rob




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


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