On Sunday 13 March 2005 02:01, Michael Crawford wrote:
> Greetings,
>
> This is my first post to the list, but I've been using OOo for almost a
> year.
>
> I have an article on the web, written in XHTML 1.0 strict with CSS,
> that I would like to convert to PDF for dead-tree publication by the
> Print on Demand service http://www.lulu.com/
>
> I need to convert each of the hyperlinks in my original document to
> footnotes in an OOo text document.  Is there some automated way to do
> this, aside from laborious manual editing?
>
> Since my original is valid XHTML, it is a conforming XML document, and
> so could be manipulated by any of the available XML tools.  For
> example, there are tools that can convert XHTML to DocBook XML.  Might
> that help?
>
> Note that I'm comfortable with compiling stuff from source myself, or
> using command-line tools.
>
> Now, I can open my original directly in OpenOffice.org, but what I get
> looks just like it does in my browser.  The hyperlinks are colored,
> for example, and the page has the background color and positioning of
> elements as specified by my stylesheet.
>
> But that's not really what I want - I want to maintain the *structure*
> of the documents, for example to turn the H1 element into the title of
> the book, and the H2 elements into section titles.  There aren't so
> many of those that I couldn't do it by hand, but it would really be a
> drag to manually edit all the tags, in particular, to make OOo forget
> they are hyperlinks.
>
> As far as I can tell so far, what I'm going to need to do is to
> convert my document to unformatted text.  I can do that in Mozilla
> with File->Save Page As, but when I do, there are line breaks at the
> end of each line, which OOo takes as the start of a new paragraph, so
> what I would have to do is go through my whole document, which is
> fifty pages in hardcopy, and delete most of the line breaks.
>
> Please tell me there is a better way to do what I want.  Somebody MUST
> have faced this problem before.

Michael,
  You best bet may be to open the XHTML doc in OOo and then write a macro to 
iterate thru the doc to convert the links to footnotes. have a look at 
http://www.pitonyak.org for a very good doc on macros with lots of examples.
If you have any specific macro questions, then email [EMAIL PROTECTED]

Another possibility is to convert the XHTML into the OpenOffice.org native XML 
( to see what it looks like unzip an SXW file and have a look at the 
content.xml file.

-- 
CPH : openoffice.org contributor

Maybe your question has been answered already?
                                http://user-faq.openoffice.org/#FAQ

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to