[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: templates matches ... ?

Subject: Re: templates matches ... ?
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Thu, 31 Jan 2002 18:46:24 -0800
davis templates
<xsl:template match="FREGeneralDocument | FREDocument">
	...
</xsl:template>

On Wednesday 30 January 2002 10:04, Frederic Leclercq wrote:
> Thanks,
>
> But I don't know if I made myself clear enough....
>
> Let's say  I have :
>
> <xsl:template match="FREGeneralDocument">
>     .... a lot of lines in here ....
> </xsl:template>
>
> <xsl:template match="FREDocument">
>     .... exactly the same as above..... a.lot of lines in here ....
> </xsl:template>
>
> In the second match all the code is exactly the same as in the first
> <template match>.... And we're talking about 500+ lines that is exactly the
> same.... i think there must be a smarter way to do this, then just copy &
> paste the code ? If there has to be something changed (bugs?) then I have
> to change the same code in the second <template match> too ....
>
> Thanks in advance,
> Fred.
>
> Michael Kay wrote:
> >>I've something like :
> >>
> >><xsl:template match="xml.fre.FREKernelKernel.FREGeneralDocument">
> >>    .... a lot of lines in here ....
> >></xsl:template>
> >><xsl:template match="xml.fre.FREKernelKernel.FREDocument">
> >>    .... exactly the same as above..... a.lot of lines in here ....
> >></xsl:template>
> >>
> >>I can't imagine that this is the way it should be written ?
> >
> >If you have an element called <xml.fre.FREKernelKernel.FREGeneralDocument>
> >then this is exactly how it should be written. Though you shouldn't have
> >such an element - apart from the fact that names begining with "xml" are
> >reserved, it suggests you are trying to pack too much meaning and
> > structure into your element names for comfort.
> >
> >Mike Kay
> >
> >
> > XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
Peter Davis
Love is what you've been through with somebody.
		-- James Thurber

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.