This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
XSLT: Does an element know about its type?
- To: xsl-list at mulberrytech dot com
- Subject: XSLT: Does an element know about its type?
- From: Wolfgang May <may at informatik dot uni-freiburg dot de>
- Date: Sat, 4 Mar 2000 17:25:47 +0100 (MET)
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I want to apply the same template to several element types. The
template should know what is the type of the current element. The
template does not completely copy the element, but restructures some
of the contents:
<xsl:template match="river|lake|sea|island|mountain|desert">
< this tag should be the element's tag, i.e, river or lake or ... >
<xsl:copy-of select=" ... several properties ..."/>
... some more things ...
</ suitable close-tag >
</xsl:template>
In the second line, the script has to examine the type of the
current element to generate the correct tag. is the something like
self.element-type?
Wolfgang
-- -----------------------------------------------------------------
Wolfgang May E-mail: may@informatik.uni-freiburg.de
Universitaet Freiburg http://www.informatik.uni-freiburg.de/~may/
Institut fuer Informatik D-79110 Freiburg / Germany
Lehrstuhl fuer Datenbanken und Informationssysteme
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list