[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Maintenance XSL/XML default template. Was: Another
Hi Citando "Zink, Juergen" <Juergen.Zink@xxxxxxxxxxxxxxxxxxxx>: } Hi, } } just consider the following case: } 3 months later someone wants a new functionality and } adds a new tag XYZ to the DTD and to the XML. } What happens in this case for the xsl? } } > ==>HERE <xsl:apply-templates select="*"/> } > <xsl:template match="HSDocumentation"/> } In this case the default template would match the tag XYZ. } } > <xsl:apply-templates select="HSString|HSDate|..."/> } In this case nothing happens to the output. The tag XYZ is ignored. } } Or <xsl:apply-templates select="*[not(self::HSDocumentation)]"/> } In this case the default template would match the tag XYZ. } } I prefer the case which the new tag XYZ will be ignored. } Point taken, and if you want to deal with the new tag XYZ you simply add it to the select. I just add the latest because in your first example to deal with HSDocumentation you'll have to use modes because every HSDocumentation, no matter where it might be, will be ignore. the latest just didn't select it, but if you select it elsewhere it will be normaly processed. You have three methods to use, the best one depends on what you what to do and on how is your xml defined. Regards, Americo Albuquerque ___________________________________________________________________ O SAPO já está livre de vírus com a Panda Software, fique você também! Clique em: http://antivirus.sapo.pt 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
|