Re: apply-templates, rule-based, and saxon - REPLY
Hi Kevin, > But isn't this conflicting to the philosophy behind template rules, > unless I am wrong in my thinking: only if you specify a template > rule will that element be matched and displayed in the output? Or, > do I need to match on every element in the source document? The built-in templates are designed so that you get a behaviour that's similar to HTML/CSS, where you only have to define rules for the things that you want to be formatted *differently* - everything gets shown, but some of it might be in a different colour or whatever. It's an inheritance from XSL(T)'s background in formatting documents. If you don't like that behaviour, you can add different default templates to get the default behaviour you want. If you want nothing to be shown by default, then add an empty template that matches the text() nodes: <xsl:template match="text()" /> If you want everything to be copied by default, then add the identity template as a default: <xsl:template match="@*|node()"> <xsl:copy> <xsl:copy-of select="@*|node()" /> </xsl:copy> </xsl:template> I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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