sibling vs child vs child of child

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: sibling vs child vs child of child

  1. #1
    Join Date
    May 2009

    sibling vs child vs child of child

    Hi, new to xml but trying to get my head around it. I have a couple of questions that hope someone can help me with:

    In this example:

    <abbr title="DOM For N00BS"><em>DOM</em></abbr>;

    Is the title attribute node a sibling or child or neither of the <abbr> element node?

    Also, if <em> is the firstChild of <abbr>, is then the text "DOM" the firstChild of <em> or is it it's sibling?

    Thank you!

  2. #2
    Join Date
    May 2009

    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="node.xsl"?>

    <abbr title="DOM For N00BS"><em>DOM</em></abbr>

    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- New document created with EditiX at Tue May 19 19:20:05 CEST 2009 -->
    <xsl:stylesheet version="1.0" xmlns:xsl="">
    	<xsl:output method="text" indent="yes"/>
    	<xsl:variable name="lf" select="'
    	<xsl:template match="/">
    	result<xsl:value-of select="$lf"/>
    	from <xsl:value-of select="name(//abbr)"/><xsl:value-of select="$lf"/>
    	child<xsl:value-of select="$lf"/>
    	node	<xsl:value-of select="name(//abbr/child::*)"/>
    	content  <xsl:value-of select="//abbr/child::*"/><xsl:value-of select="$lf"/>
    	attribut<xsl:value-of select="$lf"/>
    	node	<xsl:value-of select="name(//abbr/attribute::*)"/>
    	content  <xsl:value-of select="//abbr/attribute::*"/><xsl:value-of select="$lf"/>


    from abbr


    node em
    content DOM


    node title
    content DOM For N00BS

Similar Threads

  1. how to Edit Child datalist in a parent Datalist
    By naijacoder in forum ASP.NET
    Replies: 0
    Last Post: 04-26-2006, 11:12 PM
  2. Parent, child forms question
    By NabeeL in forum .NET
    Replies: 2
    Last Post: 03-21-2006, 08:32 PM
  3. Replies: 15
    Last Post: 03-21-2006, 06:53 AM
  4. MDI Child form positioning Questions:
    By BOOGIEMAN in forum VB Classic
    Replies: 10
    Last Post: 04-25-2005, 01:54 AM
  5. Replies: 10
    Last Post: 04-06-2005, 05:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center