Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 9th, 2004, 01:37 AM
Registered User
 
Join Date: Jan 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bvprasad
Default XML to rtf and html .Can not see images

Hi All ,

        I am working on converting the data in an xml file to html and rtf format both.

Following steps are used.
1.XML is first transformed using xsl which results in more or less like html format .
2.The result are then stored in html directly .
3.To save in RTF format MS-Word API is in VC++ . which takes the transformed data from xsl and save as rtf format .

Every thing is fine and documents can be saved in html and rtf format .

But only when i need to insert images I have problem.

I am using <img> tag in xsl .

Statement is something like this in xsl file

<xsl:element name="img">
<xsl:attribute name="src">sing.bmp</xsl:attribute>
</xsl:element>

This is inserting image in html file .But not in rtf file .There is big blank space in rtf format document .

Can any one help me why this is occuring .




 
Old January 11th, 2004, 03:04 PM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

It sounds like a problem with C++ code that converts the html to rtf. Is it your code or a third party product?

--

Joe
 
Old January 11th, 2004, 05:49 PM
Authorized User
 
Join Date: Oct 2003
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I agree with Joe. You need to verify your rtf files are including the appropriate rtf "syntax" for bringing in a graphic. Open your rtf file in notepad or some simple text editor and search the text for "INCLUDEPICTURE" or "sing.bmp". I quickly searched an rtf file of mine and pasted a snippet of an included figure example below.

{\fs4 INCLUDEPICTURE \\d "C:\\\\UserData\\\\XMLProjects\\\\Test\\\Sample.gi f" \\* MERGEFORMATINET }

Hope that helps....

...sam


 
Old January 13th, 2004, 01:39 AM
Registered User
 
Join Date: Jan 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bvprasad
Default

Many Thanks to both joefawcett, shbyland for giving some light for my problem.

joe,

I am not writing any raw rtf statements and also I am not using any third party software.I am using word API to convert HTML Stuff to rtf .

shbyland,

I serached for INCLUDEPICTURE in the rtf document .I found
INCLUDEPICTURE \\d "C:\\\\DOCUME~1\\\\prasadb\\\\LOCALS~1\\\\Temp\\\\ sing.bmp"
That means it is searching in default directory .Since there is no image in that location it is not displaying .

Image sing.bmp is located in \images under current directory .

How do I point to this directory instead of default directory.

Prasad

 
Old January 13th, 2004, 05:40 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Presumably you need to have a full url to the file, not just a relative one.
As you are doing this from code anyway you can just pass a base path in as a global parameter to the stylesheet.
Joe (MVP - xml)
 
Old August 28th, 2004, 03:58 AM
Registered User
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi i'm interested in converting xml to rtf through xsl, can you help me explaining how did you do it,
what was the parser you make use of ?

can i autogenerate this process ?
(like when a user of my system ask to generate a particular letter.. my program will get the xml element values fr oracle and then parse the xml file to become xsl and than save it as rtf ?


my system written in java

i'm on xp

thanks in advance

 
Old November 28th, 2006, 01:27 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually, I’m using RTF TO XML Converter http://www.rtf-to-xml.com by Novosoft LLC. It is really easy to use and powerful converter.






Similar Threads
Thread Thread Starter Forum Replies Last Post
C# RTF To XML nagajeya ASP.NET 1.0 and 1.1 Professional 5 December 11th, 2007 12:14 PM
convert a RTF text into HTML tag gmbalaa General .NET 0 August 16th, 2007 04:06 AM
PDF and RTF from XML rajatake XML 2 March 28th, 2007 12:35 PM
Created RTF when try to open RTF, got an error not24 C# 0 March 31st, 2006 01:31 PM
how to extract contents of an e-mail in html/rtf mogli PHP How-To 5 September 15th, 2004 04:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.