Having problems creating a xsl:when condition
Posted: Thu Mar 30, 2006 11:49 pm
What I am trying to accomplish is determine that the copiedItemRecKey is not empty and also determine whether the value in copiedItemRecKey exists in any other items by checking the value in the primaryKey of all the other items. If the node count is greater than zero then one of the items has the same key as the copiedItemRecKey.
The context when this is called is /SendRfqDto/scenariosToBeShopped/SpecialInquiryScenarioDto/itemDtos/SpecialItemDto/specialItem
<xsl:when test="(not(normalize-space(copiedItemRecKey) = '')) and (count(/SendRfqDto/scenariosToBeShopped//SpecialInquiryScenarioDto/itemDtos/SpecialItemDto/specialItem[primaryKey] = copiedItemRecKey) > 0)">
do something...
</xsl:when>
It is not working however...obviously I'm new to xsl and could be doing this completely wrong without knowing it.
Oxygen reports when I run the transform:
SystemID: /Users/mjarrett/Desktop/PreviewSpecialInquiryRFQ-new.xsl
Location: 465:0
Description: Can not convert #BOOLEAN to a NodeList!
Does anyone have any suggestions to accomplish what I'm trying to do?
The context when this is called is /SendRfqDto/scenariosToBeShopped/SpecialInquiryScenarioDto/itemDtos/SpecialItemDto/specialItem
<xsl:when test="(not(normalize-space(copiedItemRecKey) = '')) and (count(/SendRfqDto/scenariosToBeShopped//SpecialInquiryScenarioDto/itemDtos/SpecialItemDto/specialItem[primaryKey] = copiedItemRecKey) > 0)">
do something...
</xsl:when>
It is not working however...obviously I'm new to xsl and could be doing this completely wrong without knowing it.
Oxygen reports when I run the transform:
SystemID: /Users/mjarrett/Desktop/PreviewSpecialInquiryRFQ-new.xsl
Location: 465:0
Description: Can not convert #BOOLEAN to a NodeList!
Does anyone have any suggestions to accomplish what I'm trying to do?