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

RE: understanding trees

Subject: RE: understanding trees
From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx>
Date: Wed, 16 Jun 1999 16:33:41 -0400 (EST)
RE: understanding trees
At 15 Jun 1999 13:03 +0200, Andre Halama wrote:
 > thanks for all your responses, they helped clear up a lot of my problems.

That's good.

 > the one thing i couldn't get straight yet is one of the question that is
 > also in the spec (6.1.1):
 > 'Is the parent of an attribute node the element that the attribute is on?'
 > i processed one of my xml-files with both tony's stylesheet and
 > cranesoftwright's showtree and they both showed my attributes as children
 > of the elements they are associated with.

If you look at the excerpt from my stylesheet, you'll see there's
<xsl:apply-templates select="@*"/> that selects the attributes plus
the usual <xsl:apply-templates/> that selects the children of the
element node.  So the attributes really don't show up as children.

------------------------------------------------------------
  <xsl:template match="*">
    <div style="border: 1.5pt solid blue; padding: 3pt">
      <p><strong>Element: <xsl:value-of select="local-part()"/></strong></p>
      <blockquote style="background-color: silver">
	<!-- The spans are necessary because empty elements
	  count as element nodes, but Internet Explorer, at least,
	  doesn't cope very well with blockquotes containing nothing -->
	<span style="color: silver">|</span><xsl:value-of select="."/><span style="color: silver">|</span>
      </blockquote>
      <xsl:apply-templates select="@*"/>
      <xsl:apply-templates/>
    </div>
  </xsl:template>
------------------------------------------------------------

As someone else noted, however, the question in the working draft is
in the context of the parent axis for attribute nodes.

 > so, is this the answer or is michael right in saying 'They have a
 > relationship/association with the containing element but it is not the
 > "child" relationship.'?
 > 
 > hope this discussion isn't too annoying,

No.

Regards,


Tony Graham
======================================================================
Tony Graham                            mailto:tgraham@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9632
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


 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.