Hello I have not used OpenOffice before so please excuse my ignorance since I am a complete newbie at this.
However I know that since OpenOffice saves the file in XML format there should be
a way to convert an RTF file into XML via XSLT and back to RTF. The XML file is based on a schema that I have.
Has anyone tried this yet and is it something that can be done or am I wasting time?
thank you for your help.

Hello I have not used OpenOffice before so please excuse my ignorance since I am a complete newbie at this.
However I know that since OpenOffice saves the file in XML format there should be
a way to convert an RTF file into XML via XSLT and back to RTF. The XML file is based on a schema that I have.
Has anyone tried this yet and is it something that can be done or am I wasting time?

thank you for your help.

RTF is not XML and I think XSLT can only go from XML to XML, so maybe thst is not possible.
Maybe you need to use Formatting Objects (FO) which is how some people fo from XML to PDF (another non XML format) using XSLT

Hello I have not used OpenOffice before so please excuse my ignorance since I am a complete newbie at this.
However I know that since OpenOffice saves the file in XML format there should be
a way to convert an RTF file into XML via XSLT and back to RTF. The XML file is based on a schema that I have.
Has anyone tried this yet and is it something that can be done or am I wasting time?

thank you for your help.

RTF is not XML and I think XSLT can only go from XML to XML, so maybe thst is not possible.
Maybe you need to use Formatting Objects (FO) which is how some people fo from XML to PDF (another non XML format) using XSLT

Thank you for responding.

I do understand this, but I may not have been clear in my question. Since OpenOffice does save it's files in XML format, as I have read this, and it has support for MSWORD/RTF files, I was thinking that I can use OpenOffice to help generate RTF files via it's "engine" if you wanna call it that. Sort of like example below:
MyXML->OOXML(via XSLT)->RTF(via OpenOfiice).
Could this not be done? or am I thinking too far ahead?
I also know about XML FO but that is way too premature for what I need.
The apache FOP project has yet to provide RTF support, so I can't waste time with that.
I hope my question became more clear.
thank you again.

I do understand this, but I may not have been clear in my question. Since OpenOffice does save it's files in XML format, as I have read this, and it has support for MSWORD/RTF files, I was thinking that I can use OpenOffice to help generate RTF files via it's "engine" if you wanna call it that. Sort of like example below:
MyXML->OOXML(via XSLT)->RTF(via OpenOfiice).
Could this not be done? or am I thinking too far ahead?
I also know about XML FO but that is way too premature for what I need.
The apache FOP project has yet to provide RTF support, so I can't waste time with that.
I hope my question became more clear.
thank you again.

OO does not have RTF conversion (afaik). I think maybe there's some RTF export filter in the works.
The step from your xml to oo.org xml is doable if you know your dtd and the oo dtd and you can find the convertion you need.
The OO.org -> RTF can be done exporting to DOC using oo and then saving the doc as RTF with word or some other program that reads DOC and saves RTF.
Automating that process may be a bit hard.

Thank you again.
I thought it would require something like that. Probably need to create some macro along with it to export it from the OO file format to RTF/DOC. I guess I have to get in "knees deep".
I will post my findings when they are absolute.

is sound. The biggest question, I believe, is whether OOo's RTF export is suitable for your purposes.

Here are some pointers to get you started.

OOo's document format is actually a ZIP file containing XML. To create a valid Writer file, all you actually need is a file named Content.xml to be zipped into a ZIP file, and then named something that ends with ".sxw" instead of ".zip".

So how can you learn what is in the Content.xml? Well, you can study the docs. The SDK contains documentation on the XML format of all OOo document types.

A tool that might help you is my OOoDocExplorer. This is a java program. Available from OOoMacros.org here...

The way this works is thus. Launch the JAR file. A dialog box appears prompting you for a file. Select any OOo document. A new window appears that shows you the internal structure of the file as a tree of unfoldable nodes. When you click on a node, it's attributes and contents are shown. The nodes start with the top level files in the ZIP file. So first click on Content.xml to see the XML nodes within the Content.xml file.

You will have to build your XSLT to transform YourXML into Content.xml. Then you will need to ZIP this, and name it Something.sxw. Then you will need to open it in OOo. Then you will need to SaveAs into an RTF format. You could automate the SaveAs by using a Macro.

You could even embed the SaveAs macro into your document. (No reason why it is not theoretically possible.) You would have to learn just how a macro is stored within an OOo document. I've seen the Basic macro code in my documents while using my Java OOoDocExplorer program to snoop around inside my own files. You could even make your document such the "Open" event of the document triggers the macro, which then saves the document, and then closes it. (This would make it impossible to open the document, unless you turn off the ability to run macros.) But it would highly automate your conversion to RTF process.

I do understand this, but I may not have been clear in my question. Since OpenOffice does save it's files in XML format, as I have read this, and it has support for MSWORD/RTF files, I was thinking that I can use OpenOffice to help generate RTF files via it's "engine" if you wanna call it that. Sort of like example below:
MyXML->OOXML(via XSLT)->RTF(via OpenOfiice).
Could this not be done? or am I thinking too far ahead?

Thank you again.
I thought it would require something like that. Probably need to create some macro along with it to export it from the OO file format to RTF/DOC. I guess I have to get in "knees deep".
I will post my findings when they are absolute.