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

appending to result-document

Subject: appending to result-document
From: Rahil <qamar_rahil@xxxxxxxxxxx>
Date: Tue, 02 Aug 2005 14:48:28 +0100
xsl result document .net
Hi

I have an xsl file which has two output formats. The first one is .html and the other is a named xml output. I am using the <xsl:result-document> instruction for the xml output as such

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/">
<xsl:output method="html"/>
<xsl:output name="log" method="xml" indent="yes"/>


The template where I have placed the <xsl:result-document> instruction is:
----------------
<xsl:template match="TR" mode="inner">
<xsl:copy>
<xsl:choose>
<xsl:when test="..some test here">
<TD>Some HTML output here !</TD>
<xsl:result-document href="{$clsNm}.xml" format="log" type-information="none">
<Results>
<Term><xsl:value-of select="$clsNm"/></Term
</Results>
</xsl:result-document>
.............
</xsl:copy>
</xsl:template>
------------------


Now the <xsl:when> condition might be satisfied more than once when the <xsl:template> is called recursively. I dont want separate .xml files in <xsl:result-document>. In fact I want to append new <Text> element results to a single .xml file.

The present output results in 3 files: (i) mainResult.html , (ii) Log1.xml and (iii) Log2.xml

Log1.xml looks like this
-------------
<Results xmlns:saxon="http://saxon.sf.net/">
  <Term>Log1</Term>
</Results>

Log2.xml looks like this
-------------
<Results xmlns:saxon="http://saxon.sf.net/">
  <Term>Log2</Term>
</Results>

The output I want is two files: (i) mainResult.html , (ii) Log.xml
-------------
<Results xmlns:saxon="http://saxon.sf.net/">
   <Term>Log1</Term>
  <Term>Log2</Term>
</Results>
-----------------

How do I append xml tags in the log.xml file in the midst of general .html output ?

Appreciate all help.

Thanks
Rahil

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.