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

Re: is it possible to construct new xml with xsl ?

Subject: Re: is it possible to construct new xml with xsl ?
From: Meir <umen@xxxxxxxxxxxxxxxx>
Date: Mon, 17 Jun 2002 10:46:37 -0700
construct an xml document
Hello Thank for the reply
but what i meant was this : say i have this :
******************************** THE XML *******************************
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="myxsl.xsl"?>
<students>
 <male>
  <age>20</age>
  <name>shlomi</name>
 </male>
 <male>
  <age>26</age>
  <name>nadav</name>
 </male>
</students>


******************************** THE XSL *******************************
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">

<![CDATA[<?xml version="1.0"?>]]>
<![CDATA[<myroot>]]>

<xsl:for-each select="students/male">
<![CDATA[<thestudent>]]>
<![CDATA[<theage>]]>
<xsl:value-of select="age"/>
<![CDATA[</theage>]]>

<![CDATA[<thename>]]>
<xsl:value-of select="name"/>
<![CDATA[</thename>]]>
<![CDATA[</thestudent>]]>
</xsl:for-each>

<![CDATA[</myroot>]]>
</xsl:template>
</xsl:stylesheet>

the output of this xsl/xml is:
<?xml
version="1.0"?><myroot><thestudent><theage>20</theage><thename>shlomi</thena
me></thestudent><thestudent><theage>26</theage><thename>nadav</thename></the
student></myroot>

that is ok , but its not loading as xml file ....
so here i have half job done all i need to know how i can make IE to
load/parse it as xml file . whitout saveing it first to xml file..
thanks






----- Original Message -----
From: "Mike Brown" <mike@xxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Sunday, June 16, 2002 12:17 PM
Subject: Re:  is it possible to construct new xml with xsl ?


> Meir wrote:
> > is there any way to construct new xml file from given xml file
> > with xsl
>
> This is the most basic use of XSLT, transforming one XML document into
> another. Read any XSLT tutorial.
>
> > when i load the xml file with the xsl file linked to it i will see
> > in the IE new construction with the "+" and"-"
>
> IE will assume the output of the transformation is meant to be interpreted
as
> HTML. If you want collapsible views, you need to use a stylesheet that
will
> produce the (D)HTML that makes the browser produce the view you want. See
>   http://www.dpawson.co.uk/xsl/sect2/microsoft.html#d58e229
>
>    - Mike
>
____________________________________________________________________________
>   mike j. brown                   |  xml/xslt: http://skew.org/xml/
>   denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>



 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.