LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-25-2007, 10:52 PM   #1
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 647

Rep: Reputation: 91
Creating html files from svn mplayer xml?


Hi,

I have been trying to convert the english xml docs for the svn mplayer to html:

http://svn.mplayerhq.hu/mplayer/trunk/DOCS/xml/

Has anybody had any experience or success with this? I could not work out the built in compiling process and could not convert the files manually with xlstproc. Ignorance was a major impediment in both cases :-)


Thanks for any advice,

Andrew
 
Old 12-26-2007, 03:35 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,765

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
Looks like maybe:
make html-single
or:
make html-chunked
might be what you are looking for.
Any way, have a look at the Makefile for more ideas.
 
Old 12-26-2007, 04:28 AM   #3
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 647

Original Poster
Rep: Reputation: 91
Thanks Gnashley, that got me started. Looks like the configure script is not too bright and is not looking in the locations that Slackware stores 3 relevant files: an XML catalog file: "catalog", "html/chunk.xsl" and "docbook.xsl". Once I edited the configure script and directed it on the appropriate path I have been able to create the html files (although not for english only yet!).

Thanks again,

Andrew

Last edited by andrew.46; 12-26-2007 at 04:34 AM. Reason: Unclear thought corrected
 
Old 12-28-2007, 10:57 PM   #4
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 647

Original Poster
Rep: Reputation: 91
Hi,

I have managed to solve the problem completely and incorporate the solution into my home-grown SlackBuild script. For anybody that is ever interested in the same thing below is my solution, I would be very receptive to anybody pointing out errors in my technique:

1. Modify the configure script that sets up the xml to html process by adding the following, which are default paths in Slackware 12. Relevant sections and additions are:
Code:
[...]
echo "Searching for XML catalogs..."
for _try_catalog in \
/usr/share/sgml/docbook/dsssl-stylesheets-1.79/catalog \
[...]
echo "Searching for stylesheets..."
echo "Searching for html/chunk.xsl..."
for _try_chunk_xsl in \
  /usr/share/xml/docbook/xsl-stylesheets-1.72.0/html/chunk.xsl \
[...]
echo "Searching for html/docbook.xsl..."
for _try_docbook_xsl in \
  /usr/share/xml/docbook/xsl-stylesheets-1.72.0/html/docbook.xsl \
and save this in the working directory with the SlackBuild script. I have named mine 'configure_xml_help'.

2. Add the following section to the script. I have commented it fairly extensively:

Code:
# Create a directory for documentation:
mkdir -p $PKG/usr/doc/mplayer-$VERSION

# Move all the required documentation into it:
cp -a AUTHORS Copyright LICENSE README DOCS $PKG/usr/doc/mplayer-$VERSION

## Build the english xml help files:

# Copies my modified configure script over the default mplayer configure script:
cp $CWD/configure_xml_help $PKG/usr/doc/mplayer-$VERSION/DOCS/xml/configure

# Changes to the correct directory to run the new configure script:
cd $PKG/usr/doc/mplayer-$VERSION/DOCS/xml

# Creates a single page, English language, help file:
./configure
make html-single-en || exit 1

# Moves the created files (1 x html and 1 x css) in with the other help files:
mv $PKG/usr/doc/mplayer-$VERSION/DOCS/HTML-single/en/* $PKG/usr/doc/mplayer-$VERSION

# Remove the unwanted directories:
rm -rf $PKG/usr/doc/mplayer-$VERSION/DOCS
etc etc. I should mention again that this is for the svn mplayer. The rc versions come with the html files already created.

Any thoughts on this one? I have not done anything quite this complex before so I have probably gone about it a very long way :-)

Andrew
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert XML to HTML ? Roland Latour Linux - Software 1 09-24-2007 11:50 AM
text to xml to html osio Programming 5 07-28-2005 12:39 PM
html, xml, php, mysql atheist Programming 8 06-07-2004 01:28 PM
How can I transform XML into HTML on bash? pedrosan Linux - Newbie 0 04-22-2004 02:37 AM
XML can't store HTML?!? Travis86 Programming 10 08-25-2003 07:18 PM


All times are GMT -5. The time now is 11:06 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration