Subject: Re: [xsl] Inserting Title before Tgroup and Creating Spans From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 09 Jan 2009 09:54:37 -0500 |
1. How can I transform <caption> to <title> and insert the <title> before <tgroup> in this HTML table to XML Exchange Table conversion. Caption does not always exist. It is optional in the current model. I originally created a template for "caption" but my output had <caption> as a child of <tgroup>. <caption> needs to be a preceding sibling to <tgroup>.
<xsl:for-each select="caption"> <title> <xsl:apply-templates/> </title> </xsl:for-each>
My current XSLT (an IF for <caption>) gives me nearly the result I need with the exception of the title text being output as part of <tgroup>. I'm sure there is to create a template for <caption> and insert the resulting <title> as a child of table but a preceding sibling of <tgroup>. (standard table structure).
2. My second problem is a little more complex. I need to transform the colspan=(0-9) attribute to a "namest" and "nameend" attributes for the column spans. I have it figured out if there happens to only be a single span in a row. But if there are additional spans after the first span, I'm having trouble figuring out how to calculate the begin and end columns for any second and succeeding spans. Any help is much appreciated. My XSLT follows first, then my current output, then the desired output.
Good luck -- Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Inserting Title before Tg, David Carlisle | Thread | [xsl] Strange error: Unknown collat, peter verhaar |
Re: [xsl] RE: How to call an extern, Florent Georges | Date | RE: [xsl] RE: How to call an extern, Ylvisaker, Steve |
Month |