Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 9th, 2004, 01:37 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
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 .




Reply With Quote
  #2 (permalink)  
Old January 11th, 2004, 03:04 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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
Reply With Quote
  #3 (permalink)  
Old January 11th, 2004, 05:49 PM
Authorized User
 
Join Date: Oct 2003
Location: , PA, USA.
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


Reply With Quote
  #4 (permalink)  
Old January 13th, 2004, 01:39 AM
Registered User
 
Join Date: Jan 2004
Location: , , .
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

Reply With Quote
  #5 (permalink)  
Old January 13th, 2004, 05:40 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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)
Reply With Quote
  #6 (permalink)  
Old August 28th, 2004, 03:58 AM
Registered User
 
Join Date: Aug 2004
Location: subang jaya, selangor, Malaysia.
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

Reply With Quote
  #7 (permalink)  
Old November 28th, 2006, 01:27 AM
Registered User
 
Join Date: Nov 2006
Location: Novosibirsk, Novosibirsk oblast, Russia.
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 12:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.