Subject: [xsl] complex "insert" rules; generalized insert From: Eric Compas <edcompas@xxxxxxxx> Date: Wed, 13 Oct 2004 13:19:27 -0500 |
Potential input #1 (node "child_c" already exists): =========================================== <parent> <child_a></child_a> <child_b></child_b> <child_c></child_c> <child_d></child_d> <child_e></child_e> </parent>
Potential input #2 (node "child_c" doesn't exist): =========================================== <parent> <child_a></child_a> <child_b></child_b> <child_d></child_d> <child_e></child_e> </parent>
Potential input #4 (node "child_c" exists, but in wrong location): =========================================== <parent> <child_c></child_c> <child_a></child_a> <child_b></child_b> <child_d></child_d> <child_e></child_e> </parent>
Desired output: (exept "child_b" would be missing in input #3): =========================================== <parent> <child_a></child_a> <child_b></child_b> <child_c></child_c> <child_d></child_d> <child_e></child_e> </parent>
My attempt at the stylesheet: =========================================== <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:output method="xml" indent="yes"/>
<xsl:template match="/"> <xsl:apply-templates/> </xsl:template>
<!-- TEMPLATE: default --> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template>
-- __________________________________ Eric Compas PhD Student Geography Department 550 Science Hall University of Wisconsin-Madison 500 North Park Street Madison, WI 53706 Email: edcompas@xxxxxxxx Phone: 608-238-1654
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Processing xsl within an , Wendell Piez | Thread | Re: [xsl] complex "insert" rules; g, Wendell Piez |
RE: [xsl] xsl:number with level=any, Richard Tobin | Date | Re: [xsl] Processing xsl within an , Wendell Piez |
Month |