This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

XSLT: Does an element know about its type?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]