xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Obtaining the element name


Subject: Re: Obtaining the element name
From: Bernd.Loepmeier@xxxxxx
Date: Tue, 3 Nov 1998 13:22:17 +0100

Hi Nigel,

I think if you are using Microsofts msxml you can get at the element type
by appending "type" at the <elementtag>.

For example:
if (elementtag.type == 0)
     return "Element"

0 - ELEMENT
1 - TEXT
2 - COMMENT
3 - DOCUMENT
4 - DTD

For further information visit Microsofts Site:

http://www.microsoft.com/xml/articles/xmlmodel.asp

Regards

Bernd Löpmeier






Nigel Hutchison <nwoh@xxxxxxxxxxxxxx> on 02.11.98 19:20:12

Please respond to xsl-list@xxxxxxxxxxxxxxxx

To:   xsl-list@xxxxxxxxxxxxxxxx
cc:    (bcc: Bernd Löpmeier/MLC Systeme GmbH)
Subject:  Obtaining the element name



Content-type: text/plain; charset=us-ascii


I am trying to translate the Microsoft XSL style sheet listed below into
XSL1.0
How do I get at the element type? Is there a functional equivalent to
"tagname" that I can use
within a template like this to pick out the element type within a template
that matches as follows:
<xsl:template match="*|/"> </xsl:template>

***************************************************************************
*
*******************++
<xsl>
     <!-- Generic stylesheet for viewing XML -->
     <!-- Note that this stylesheet does not display attributes. -->
     <rule>
          <root/>
          <DIV font-family="Courier" font-size="10pt">
               <SPAN color="gray">&lt;<eval>tagName</eval>&gt;</SPAN>
                    <children/>
               <SPAN color="gray">&lt;/<eval>tagName</eval>&gt;</SPAN>
          </DIV>
     </rule>
     <!-- Default Rule - matches any element -->
     <rule>
          <target-element/>
          <DIV margin-left="1em">
               <SPAN
color="gray">&lt;<eval>tagName</eval>&gt;</SPAN><children/><SPAN
color="gray">&lt;/<eval>tagName</eval>&gt;</SPAN>
          </DIV>
     </rule>
</xsl>

Nigel W. O. Hutchison
Technical Consultant
Software AG Germany
mailto:nwoh@xxxxxxxxxxxxxx
Tel +49 (0)6151 92 1207
                                                                   *

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







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



Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor