Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Format table/cell

From: Taras@-----------.---------.---
To: NULL
Date: 3/6/2009 8:09:00 AM
Martin,
I need to create a .RTF file that can be opened by Word.  It's being created 
out of an ASP web application.  I'm totally new to HTML/XML so I copied some 
examples from various sources.

What I need to accomplish is when a user clicks on a print button on an edit 
page in the application a file is created that can be opened by Word (or any 
other word processor).

I getting this to work by creating an XML file with the data and using the 
XSLT file to transform it.  May not be pretty, or most efficient way, but was 
the only way I could get it to work in a short time frame.  The only thing 
I'm missing is the grid lines around the cells in the table of the word 
document.

Thanks

"Martin Honnen" wrote:

> Taras wrote:
> > There is probably a simple answer to this, but I haven't been able to figure 
> > it out - hope someone can help.
> > I have an .xslt file with this bit of "code".  The output is a two column 
> > table with multiple rows and is coming out correctly as an .rft/.doc file.  
> > What I can't get is to have the grid lines displayed
> >   <xsl:template match="CLRow">
> >     <div 
> > style="margin-left:100px;margin-top:100px;margin-bottom:100px;border:solid">
> >       <table border="10" cellpadding="10" frame="box">
> >         <xsl:text>\trowd\cellx3000\cellx9000\intbl\ql </xsl:text>
> >         <xsl:value-of select="CLTitle"/>
> >         <xsl:text> \cell </xsl:text>
> >         <xsl:text>\ql </xsl:text>
> >         <xsl:value-of select="CLData" />
> >         <xsl:text>\par</xsl:text>
> >         <xsl:text>\cell </xsl:text>
> >         <xsl:text>\ql </xsl:text>
> >         <xsl:text>\pard\intbl\row</xsl:text>
> >       </table>
> >     </div>
> >   </xsl:template>
> > 
> > I'm quite new to xml/html, etc.  Can someone give me some guidance?  (This 
> > is not for a class assignment.)
> 
> I am not sure what you want to achieve. Your code mixes HTML and RTF (I 
> think), what is that supposed to do?
> If you want to output a HTML table then you need e.g.
>    <table>
>      <tbody>
>        <tr>
>          <td>cell content</td>
>          <td>cell content</td>
>        </tr>
>      </tbody>
>    </table>
> 
> 
> 
> -- 
> 
> 	Martin Honnen --- MVP XML
> 	http://JavaScript.FAQTs.com/
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent