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

Re: Transform XML

Subject: Re: Transform XML
From: me@xxxxxxxxxxxx
Date: Wed, 30 Apr 2003 09:34:04 -0700 (PDT)
transform xml result template
> Hello, I need to take the following XML and transform
> it into something
> quite simpler, this might be the result:
> 
> <?xml version="1.0">
> <FLDS>
>     <FLD name="orig_fld_name"/>
>     <FLD name="orig_fld_name"/>
>     <FLD name="orig_fld_name"/>
>     <FLD name="orig_fld_name"/>
>     ...
> </FLDS>
> 
> Now, I get how to loop through the following XML, and
> all that jazz... but I
> need help setting up the template so that I can write
> back XML.  As in:  how
> do you write XML tags (nodes), can you prefix them?  I
> have set the XSL
> output to "XML", is there some sort of copy command.
> Thanks!
> Karl
> 
> What I have to work with is a persisted ADOXML
> Recordset, and it looks like
> this:

Go ahead and send 20% of you paycheck to Rob Rohan...
hehehehe

<?xml version="1.0" encoding="utf-8"?>
<!--
	Author: 
	File: 
	Date: 
	Purpose: 
-->
<xsl:stylesheet version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:s="uuid:BDC6E3F0 6DA3 11d1 A2A3 00AA00C14882"
	exclude-result-prefixes="s xsl"
>
	<xsl:output method="xml" indent="yes"
encoding="UTF-8"/>

	<xsl:template match="/">
	<FLDS>
		<xsl:apply-templates />
	</FLDS>
	</xsl:template>
	
	<xsl:template
match="/xml/s:Schema/s:ElementType/s:AttributeType">
	<xsl:element name="FLD">
		<xsl:attribute name="name">
			<xsl:value-of select="@name" />
		</xsl:attribute>
	</xsl:element>
	</xsl:template>
</xsl:stylesheet>

    _/  _/_/    _/_/_/
   _/_/   _/ _/     _/
  _/               _/
 _/             _/
_/          _/_/_/_/
http://treebeard.sourceforge.net
http://ashpool.sourceforge.net

 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.