Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Re: xsl-list Digest 1 Jun 2006 05:10:01 -0000 Issue 793

From: Chad Chelius <cchelius@--------------->
To:
Date: 6/1/2006 9:08:00 PM
David,

I think this is making more sense now. The first part of the template  
below, creates the parent elements like we had discussed before, and  
the tags for the child elements of <Story> in this case don't start  
to show up until I tell them to like in the second part of the  
template. One thing that I have run into is the fact that I need to  
rename the <Story> element after or during processing. How do I  
accomplish something like that?



   <xsl:template match="Story">

        <xsl:copy>

            <BB><TG><TI>

                <xsl:apply-templates select="articleTitle| 
articleSubTitle"/>

            </TI></TG></BB>

            <xsl:apply-templates select="*[not(self::articleTitle or  
self::articleSubTitle)]"/>

        </xsl:copy>

    </xsl:template>



<-- Second part -->



    <xsl:template match="Root">
        <DG>
            <xsl:apply-templates select="@*|node()"/>
        </DG>
    </xsl:template>

chad




On Jun 1, 2006, at 12:05 PM, David Carlisle wrote:





I need all of the other elements to come over as
well and I need to rename those elements.
yes that's what the
 <xsl:apply-templates select="*[not(self::title or self::subtitle)]"/>
is doing, applying your templates to all the child elements.
Sounds like you don't want document to go to document though so change
 <xsl:copy>  to <D>

and when I said



you just need a standard identity template,
read that as "you just need the templates doing whatever  
transformation

they are doing"



David


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent