[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: template's match-set ? (feature request?)
If the different elements are in the same substitution group, then you can match them in XSLT 2.0 by writing <xsl:template match="*[. instance of element foo]"> where foo is the head element of the substitution group. We are hoping to come up with better syntax for this, but the functionality is there. Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Robert Koberg > Sent: 06 September 2002 13:40 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: template's match-set ? (feature request?) > > > Hi, > > [forgive me if this is already available. if so, what is it called?] > > I was looking for the following functionality in the draft > for XSLT2, but could not find it. It seems like it is possible. > > Anyway, what I want to do is have a 'match-set' (sort of like > attribute-set) that I can 'use-match-set' on various > templates with different modes. > > For example: > > <xsl:match-set name="content-pieces"> > <xsl:match name="article"/> > <xsl:match name="faq"/> > <xsl:match name="job"/> > </xsl:match-set> > > <xsl:template use-match-set="content-pieces" mode="mode-1"> > <xsl:apply-templates/> > </xsl:template> > > <xsl:template use-match-set="content-pieces" mode="mode-2"> > <xsl:apply-templates/> > </xsl:template> > > <xsl:template use-match-set="content-pieces" mode="mode-n"> > <xsl:apply-templates/> > </xsl:template> > > This would be useful to me because I am occiasionally adding > new tags to my schema that work the same in the XSLT, in many cases. > > Does this exist in some other way? Is this a reasonable > request if it does not? > > best, > -Rob > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > 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
|