[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Complex Condition problem with Attributes
> <xsl:when test="//*[contains(name(),'DebtManagement') and > (//*[contains(name(),'DebtManagement')]@action='add' or > //*[contains(name(),'DebtManagement')]@action='delete')"> > > It failes at the position @. But why? Your syntax is wrong. Either //*[contains(name(),'DebtManagement')]/@action (which is not what you want as it would choose the attribute - that is, test if the attribute existed. Or //*[contains(name(),'DebtManagement')][@action] (which would choose the element (marked with *) that contains an attribute called action). What you want is something like: <xsl:when test="//*[contains(name(),'DebtManagement') and (@action='add' or @action='delete')]"> Which gives all the elements in the stylesheet that: has a name which contains the string 'DebtManagement' and has an attribute called action with a string value of either 'add' or 'delete'. Regards, Ragulf Pickaxe :-)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|