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

Re: RE: Producing Excel 2000 htm files: how do I manag

Subject: Re: RE: Producing Excel 2000 htm files: how do I manage the hidden stuff
From: "Jon Gorman" <jonathan.gorman@xxxxxxxxx>
Date: Tue, 2 May 2006 12:39:06 -0500
Re: RE:  Producing Excel 2000 htm files: how do I manag
On 5/2/06, cknell@xxxxxxxxxx <cknell@xxxxxxxxxx> wrote:
The direct answer is, "Because I didn't think of it." Having now tried it, I
can tell you that it strips away all the XML markup from the document, leaving
only the element contents.

It creates an comment, just like xsl:element.  The content of the
comment are determined by what the xsl:comment element contains.
Remember that a comment doesn't contain markup (since it is after all,
just text).  So when you have a element somewhere in the template, it
returns just the text value.  (Just as if you evaluated an element as
a string elsewhere in XSLT).

If you want to complate the sin of inserting functionality in a
non-functional part of the xml document, you'll need to tell it what
text you want to output (ie the "looks like markup" but is not).

So one possible way of doing this would be something like:

<xsl:template match="*" mode="insideComment">
    <xsl:text>&lt;</xsl:text><xsl:value-of select="name(.)"
/><xsl:text>&gt;</xsl:text>
<xsl:apply-templates />
<xsl:text>&lt;/</xsl:text><xsl:value-of select="name(.)"
/><xsl:text>&gt;</xsl:text>
  </xsl:template>



Of course, I wonder more:
1) Why not just do it in the Excel xml format if your target is Excel
2000.  I thought that was more well supported and documented for the
2000 version?

2) Why not use some other XML techniques (SAX or DOM) or libraries in
conjunction with XSLT to produce an Excel binary?  This is an approach
I find myself taking, but mostly because of a mixed user base who
might be still using versions of Excel earlier than 2000.

Jon Gorman

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

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-2007 All Rights Reserved.