LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Creating html files from svn mplayer xml? (https://www.linuxquestions.org/questions/slackware-14/creating-html-files-from-svn-mplayer-xml-609120/)

andrew.46 12-25-2007 10:52 PM

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

gnashley 12-26-2007 03:35 AM

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.

andrew.46 12-26-2007 04:28 AM

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

andrew.46 12-28-2007 10:57 PM

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


All times are GMT -5. The time now is 02:10 AM.