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

RE: not a well-formed output XML

Subject: RE: not a well-formed output XML
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Wed, 2 Mar 2005 14:06:52 +0200
RE:  not a well-formed output XML
Hi,

>  Im really tired of trying to make my XML document
> well-formed as well
> as enable recursive looping until no more 'children' or
> 'implications'
> of a particular element are found, so would appreciate any help. The
> output that I receive is correct (it does all the right
> extraction) though.

  <xsl:template match="SubConcepts">
    <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <xsl:for-each select="descendant::SubConcept">
        <xsl:copy>
          <xsl:apply-templates select="@*"/>
          <xsl:apply-templates select="*[1]" mode="walker"/>
        </xsl:copy>
      </xsl:for-each>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="Value | ChildConcept" mode="walker">
    <xsl:apply-templates select="."/>
    <xsl:apply-templates select="following-sibling::*" mode="walker"/>
  </xsl:template>
  <xsl:template match="*" mode="walker">
    <xsl:apply-templates select="following-sibling::*" mode="walker"/>
  </xsl:template>
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>

Donno what that grouping method is called, but it's one of the ones that you
encounter if you search the list archives.

Cheers,

Jarno - Madam Zu: September 2002 Mix

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.