[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: remaining part of( IF-Test...continued )
> My problem is the <book> element gets eliminated in > the output altogether. No, you never can "eliminate" any node. You must bear in mind that there is a difference between the input tree and the output tree. If you want to copy the <Book> from the input to the output, then you have to tell it to the processor: <xsl:template match="Book"> <!-- copy <Book> --> <xsl:copy> <!-- copy all attributes --> <xsl:copy-of select="@*"/> <!-- if no @ISBN add @NOCODE --> <xsl:if test="not(@ISBN)"> <xsl:attribute name="NOCODE"> <xsl:text>B01</xsl:text> </xsl:attribute> </xsl:if> </xsl:copy> </xsl:template> Regards, Joerg XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|