[docbook-apps] Update on roundtrip: wordml to docbook

2007-10-01 Thread Mathieu Malaterre
Hi there,

  I posted a while back a couples of issues with roundtrip doing a
wordml to docbook conversion. Ref:

  http://www.oasis-open.org/archives/docbook-apps/200701/msg00244.html

  Steve Ball mentioned he is working on the 'next gen' of roundtrip.
Is there any update on that work ? BTW is it going to move to XSLT 2.0
(simple curiosity) ?

  As a side note is there anyone else trying to convert a 'human
written' document into a 'machine' readable document ? I have done
very little progress for extracting some info (mostly
informaltable/):

from

  http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/07_03pu.xml

into

http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Source/InformationObjectDefinition/ModuleAttributes.xml

  Should I give up on docbook and switch to ODF (micro$oft has now a
full converter from doc to odf) ? Are there more tools digesting ODF
than docbook ?

Thanks for comments,


--
Mathieu
Ref: original word document can be found here:

  http://medical.nema.org/dicom/2007/07_03pu.doc

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



[docbook-apps] Re: Update on roundtrip: wordml to docbook

2007-10-08 Thread Mathieu Malaterre
Anyone ?

Thanks,

On 10/1/07, Mathieu Malaterre [EMAIL PROTECTED] wrote:
 Hi there,

   I posted a while back a couples of issues with roundtrip doing a
 wordml to docbook conversion. Ref:

   http://www.oasis-open.org/archives/docbook-apps/200701/msg00244.html

   Steve Ball mentioned he is working on the 'next gen' of roundtrip.
 Is there any update on that work ? BTW is it going to move to XSLT 2.0
 (simple curiosity) ?

   As a side note is there anyone else trying to convert a 'human
 written' document into a 'machine' readable document ? I have done
 very little progress for extracting some info (mostly
 informaltable/):

 from

   http://gdcm.svn.sourceforge.net/viewvc/gdcm/Sandbox/07_03pu.xml

 into

 http://gdcm.svn.sourceforge.net/viewvc/gdcm/trunk/Source/InformationObjectDefinition/ModuleAttributes.xml

   Should I give up on docbook and switch to ODF (micro$oft has now a
 full converter from doc to odf) ? Are there more tools digesting ODF
 than docbook ?

 Thanks for comments,


 --
 Mathieu
 Ref: original word document can be found here:

   http://medical.nema.org/dicom/2007/07_03pu.doc



-- 
Mathieu

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



[docbook-apps] Generating PDF from docbook on Linux (OSS)

2010-01-22 Thread Mathieu Malaterre
hi there,

  I am looking for tool that would generate PDF file from a docbook
file. I tried a couple without success:

- forgedp, does not process MathML 2.0 equation at all (no output!),
- publican simply aborts on my machine (*)
- xmlto fails not process MathML 2.0 equation (**),

Document is simply:
?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
[
!ENTITY % MATHML.prefixed INCLUDE
!ENTITY % MATHML.prefix mml
!ENTITY % equation.content (alt?, (graphic+|mediaobject+|mml:math))
!ENTITY % inlineequation.content
(alt?, (inlinegraphic+|inlinemediaobject+|mml:math))
!ENTITY % mathml PUBLIC -//W3C//DTD MathML 2.0//EN
http://www.w3.org/Math/DTD/mathml2/mathml2.dtd;
%mathml;]
article
  sect1 id=section_Description
titleDescription/title
  para
equation
titleMy MathML example/title
mml:math
  mml:mrow
mml:mosum;/mml:mo
mml:mn4/mml:mn
mml:mo+/mml:mo
mml:mix/mml:mi
  /mml:mrow
/mml:math
/equation
  /para
  /sect1
/article


Could someone please let me know what are the command line tool that
should be used for this particular example (debian system) ? I am
thinking of a sequence xstlproc then fop, but I did not find any
definitive guide.

Thanks,
-- 
Mathieu

(*)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566271
(**)
 $ xmlto --with-fop pdf /tmp/math.xml
I/O error : Attempt to load network entity
http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
/tmp/math.xml:12: warning: failed to load external entity
http://www.w3.org/Math/DTD/mathml2/mathml2.dtd;
%mathml;
^
Entity: line 1:
 %mathml;
 ^
/tmp/math.xml:23: namespace error : Namespace prefix mml on math is not defined
mml:math
 ^
/tmp/math.xml:24: namespace error : Namespace prefix mml on mrow is not defined
  mml:mrow
   ^
/tmp/math.xml:25: namespace error : Namespace prefix mml on mo is not defined
mml:mosum;/mml:mo
   ^
/tmp/math.xml:26: namespace error : Namespace prefix mml on mn is not defined
mml:mn4/mml:mn
   ^
/tmp/math.xml:27: namespace error : Namespace prefix mml on mo is not defined
mml:mo+/mml:mo
   ^
/tmp/math.xml:28: namespace error : Namespace prefix mml on mi is not defined
mml:mix/mml:mi
   ^
Making portrait pages on letter paper (215.9mmx279.4mm)
math encountered in equation, but no template matches.
mrow encountered in math, but no template matches.
mo encountered in mrow, but no template matches.
mn encountered in mrow, but no template matches.
mo encountered in mrow, but no template matches.
mi encountered in mrow, but no template matches.
Jan 22, 2010 5:19:00 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
SEVERE: Couldn't find hyphenation pattern en

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

2010-01-24 Thread Mathieu Malaterre
On Sat, Jan 23, 2010 at 4:41 PM, Daniel Leidert
daniel.leidert.s...@gmx.net wrote:
 Am Freitag, den 22.01.2010, 19:15 +0100 schrieb Daniel Leidert:
 Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:

 [..]
  $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
  -xml /tmp/math.xml -pdf foo.pdf
 [..]
  Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry 
  findFOMaker
  WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math

 SAee the first URL I gave you.

 It works to put the find_jars line into ~/.foprc. Do it is not required
 to touch the fop script.

Here it goes again:

$ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
-xml /tmp/math.xml -pdf foo.pdf
/home/mathieu/.foprc: line 1: find_jars: command not found

Searching on the net it seems I simply need to append those jar file
to CLASSPATH, so instead I tried:

$ CLASSPATH=/usr/share/java/jeuclid-fop.jar:/usr/share/java/jeuclid-core.jar
fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml
/tmp/math.xml -pdf foo.pdf
/home/mathieu/.foprc: line 1: find_jars: command not found
Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
WARNING: javax.xml.transform.TransformerException: Making portrait
pages on USletter paper (8.5inx11in)
Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
WARNING: javax.xml.transform.TransformerException: Read
/usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
Exception in thread main java.lang.NoSuchMethodError:
org.apache.fop.fo.properties.CommonFont.getFontState(Lorg/apache/fop/fonts/FontInfo;)[Lorg/apache/fop/fonts/FontTriplet;
at 
net.sourceforge.jeuclid.fop.JEuclidElement.createPropertyList(JEuclidElement.java:157)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:318)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
at 
org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:206)
at 
org.apache.xml.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524)
at 
org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:985)
at 
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:520)
at 
org.apache.xml.dtm.ref.DTMTreeWalker.dispatachChars(DTMTreeWalker.java:204)
at 
org.apache.xml.dtm.ref.DTMTreeWalker.startNode(DTMTreeWalker.java:333)
at org.apache.xml.dtm.ref.DTMTreeWalker.traverse(DTMTreeWalker.java:114)
at 
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchToEvents(SAX2DTM.java:750)
at 
org.apache.xalan.serialize.SerializerUtils.outputResultTreeFragment(SerializerUtils.java:141)
at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:192)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at 
org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:341)
at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:290)
at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
at 
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
at 
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
at 
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes

Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

2010-01-24 Thread Mathieu Malaterre
On Sun, Jan 24, 2010 at 11:04 AM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 On Sat, Jan 23, 2010 at 4:41 PM, Daniel Leidert
 daniel.leidert.s...@gmx.net wrote:
 Am Freitag, den 22.01.2010, 19:15 +0100 schrieb Daniel Leidert:
 Am Freitag, den 22.01.2010, 18:19 +0100 schrieb Mathieu Malaterre:

 [..]
  $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
  -xml /tmp/math.xml -pdf foo.pdf
 [..]
  Jan 22, 2010 6:10:33 PM org.apache.fop.fo.ElementMappingRegistry 
  findFOMaker
  WARNING: Unknown formatting object http://www.w3.org/1998/Math/MathML^math

 SAee the first URL I gave you.

 It works to put the find_jars line into ~/.foprc. Do it is not required
 to touch the fop script.

 Here it goes again:

 $ fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl
 -xml /tmp/math.xml -pdf foo.pdf
 /home/mathieu/.foprc: line 1: find_jars: command not found

 Searching on the net it seems I simply need to append those jar file
 to CLASSPATH, so instead I tried:

 $ CLASSPATH=/usr/share/java/jeuclid-fop.jar:/usr/share/java/jeuclid-core.jar
 fop -xsl /usr/share/xml/docbook/stylesheet/nwalsh/fo/docbook.xsl -xml
 /tmp/math.xml -pdf foo.pdf
 /home/mathieu/.foprc: line 1: find_jars: command not found
 Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
 WARNING: javax.xml.transform.TransformerException: Making portrait
 pages on USletter paper (8.5inx11in)
 Jan 24, 2010 10:59:18 AM org.apache.fop.cli.InputHandler warning
 WARNING: javax.xml.transform.TransformerException: Read
 /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
 Exception in thread main java.lang.NoSuchMethodError:
 org.apache.fop.fo.properties.CommonFont.getFontState(Lorg/apache/fop/fonts/FontInfo;)[Lorg/apache/fop/fonts/FontTriplet;
        at 
 net.sourceforge.jeuclid.fop.JEuclidElement.createPropertyList(JEuclidElement.java:157)
        at 
 org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:318)
        at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
        at 
 org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:206)
        at 
 org.apache.xml.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:524)
        at 
 org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:985)
        at 
 org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:520)
        at 
 org.apache.xml.dtm.ref.DTMTreeWalker.dispatachChars(DTMTreeWalker.java:204)
        at 
 org.apache.xml.dtm.ref.DTMTreeWalker.startNode(DTMTreeWalker.java:333)
        at 
 org.apache.xml.dtm.ref.DTMTreeWalker.traverse(DTMTreeWalker.java:114)
        at 
 org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchToEvents(SAX2DTM.java:750)
        at 
 org.apache.xalan.serialize.SerializerUtils.outputResultTreeFragment(SerializerUtils.java:141)
        at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:192)
        at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:141)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
        at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at 
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
        at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at 
 org.apache.xalan.templates.ElemElement.constructNode(ElemElement.java:341)
        at org.apache.xalan.templates.ElemElement.execute(ElemElement.java:290)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
        at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at 
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at 
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
        at 
 org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
        at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400

Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

2010-01-24 Thread Mathieu Malaterre
On Sun, Jan 24, 2010 at 11:09 AM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 The pdf looks bizarre but at least I am getting something out !

For anyone intersted here is what the output looks like:

http://malatsblog.blogspot.com/2010/01/generating-pdf-from-docbook-on-linux.html


-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] LaTex to MathML

2010-01-25 Thread Mathieu Malaterre
Hi,

  I am trying to have a nice setup to be able to write math equation
within a docbook document. I found this old email (*), which looks
ideal. My team knows basic latex equation or at least this is easier
to write it by hand than a MathML one.
  However this old post does not mention the tool used to do the LaTex
to Math conversion. Could someone please recommend one ?

Thanks !
-Mathieu
(*)
On Mon, Oct 20, 2008 at 3:44 PM,  justus-b...@piater.name wrote:
 Dave Pawson da...@dpawson.co.uk wrote on Mon, 20 Oct 2008 13:49:51
 +0100:

 http://www.antennahouse.com/product/mathml.htm

 Nikolai has http://www.grigoriev.ru/svgmath/

 I.e. mathml to SVG, then incorporate the SVG into docbook/fo

 There is also Apache FOP with the JEuclid FOP plugin.

 I have used both methods; both have minor quirks but are pretty usable
 and give satisfactory results for all of my current needs. I currently
 prefer the latter, as it requires fewer processing steps than svgmath.

 Then there is my own baby, http://sourceforge.net/projects/pmml2svg/,
 which seeks to provide an XSLT-only solution by converting MathML to
 SVG (for non-Gecko Web browsers, FOP without JEuclid, inkscape etc.).
 It is currently working as a proof of concept, and I have a student
 working on it, hoping to make it an attractive alternative by summer
 2009.

 AFAIK there is no 'recommended' way to get mathml (either kind)
 embedded into docbook... yet.

 Yep. What I do is:

 - type individual variables and very short equations directly as
  mathml

 - type more lengthy math in LaTeX syntax into textobject role=tex
  directly into the docbook source, followed by a

  textobject role=html
    xi:include href=texmath/whatever.xml/
  /textobject

  I have makefile-triggered scripts that create the whatever.xml using
  a standalone TeX-to-MathML converter.

 To reduce typing to a minimum, I use emacs-lisp code to create the
 docbook math environments ([inline]equation and subtrees).

 This setup works very efficiently for me now, but takes some setting
 up.

 Justus

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating PDF from docbook on Linux (OSS)

2010-01-25 Thread Mathieu Malaterre
Hi Daniel,

On Sun, Jan 24, 2010 at 1:55 PM, Daniel Leidert
daniel.leidert.s...@gmx.net wrote:
 Well, this also doesn't work on Sid, where it dies with network
 down-like messages. However, the issue might simply be, that by using
 the docbook-xsl stylesheet directly with fop it misses to set
 fop1.extensions. One could write a minimal stylesheet, that imports
 docbook.xsl and sets fop1.extensions. But I don't know, if this will
 help you. Looks like the issue is somehow caused by libjeuclid-fop-java.

Could you do me a favor ? Please run the following command line on
your debian box.:

$ jeuclid-cli example1.mml example1.png  -backgroundColor white

You may need:
$ sudo apt-get install jeuclid-cli

Please send me the generated pdf file (offlist).

Thanks,
-- 
Mathieu
?xml version=1.0?
!DOCTYPE math PUBLIC -//W3C//DTD MathML 2.0//EN http://www.w3.org/TR/MathML2/dtd/mathml2.dtd;
math mode=display
  mrow
munderover
  mo#x222B;/mo
  mn1/mn
  mix/mi
/munderover
mfrac
  midt/mi
  mit/mi
/mfrac
  /mrow
/math
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

[docbook-apps] Apostrophe in docbook document

2010-01-25 Thread Mathieu Malaterre
Hi there,

 I would like to know what are people using for there apostrophe in there
docbook document ? There are 4 contestants:
1 ’ (curly on UTF-8 system)
2 rsquo;
3 '
4 #8217;

#3 is the fastest to type. #2 and #4 are ugly to read when editing the .xml
file using text file. How about solution #1 ?

Thanks
-- 
Mathieu


[docbook-apps] Breaking docbook into multiple files

2010-01-25 Thread Mathieu Malaterre
Hi,

  I have another simple question. What is the recommended way of
splitting a large docbook document into multiple other ? I see two
options:

- XInclude
- Inside the DCOTYPE, as !ENTITY new-name SYSTEM filename

What are the drawbacks/ advantages ?

Thanks,
--
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: Breaking docbook into multiple files

2010-01-25 Thread Mathieu Malaterre
I found the answer after all here:

http://docbook.org/tdg5/en/html/ch02.html#ch02-physdiv

sorry for the noise

On Mon, Jan 25, 2010 at 5:47 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi,

  I have another simple question. What is the recommended way of
 splitting a large docbook document into multiple other ? I see two
 options:

 - XInclude
 - Inside the DCOTYPE, as !ENTITY new-name SYSTEM filename

 What are the drawbacks/ advantages ?

 Thanks,
 --
 Mathieu




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] html2docbook: issue with h2/

2010-01-26 Thread Mathieu Malaterre
Hi there,

  I'd like to know if anyone is using the script from the page:
http://wiki.docbook.org/topic/Html2DocBook

  I tried on a very tidy example:

$ cat input.xhtml
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
body
h1Title1/h1
pbla 1/p
h2Title2/h2
pbla 2/p
/body
/html


Here is what I get as output:

$ cat output.xml
?xml version=1.0?
section
  titleTitle1/title
  parabla 1/para
  parabla 2/para
/section

The title in h2 element is lost during the conversion.

Any idea on how to fix that ?

Thanks,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] html2docbook: issue with h2/

2010-02-10 Thread Mathieu Malaterre
On Thu, Jan 28, 2010 at 9:43 AM, Michael Fuchs ml...@dbdoclet.org wrote:
 Hello Mathieu,

 herold produces DocBook5, which has no ulink element at all. Therefore
 the linking is based on xlink.

Thanks !

BTW I found out herold does not support table/

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
titlet/title
/head
body
table border=0 cellspacing=0 cellpadding=0 width=800
tr
td
hello
/td
/tr
/table
/body
/html


leads to:

?xml version=1.0 encoding=UTF-8?
article version=1.0 xmlns=http://docbook.org/ns/docbook;
xmlns:xl=http://www.w3.org/1999/xlink;
  info
titlet/title
  /info
  row
entrypara hello /para/entry
  /row
/article

I am forwarding that to the dbdoclet mailing list...oh well


-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] html2docbook: issue with h2/

2010-02-10 Thread Mathieu Malaterre
Here is what I did:

  wget http://www.dbdoclet.org/archives/herold_5.2.2.jar
  jar xvf herold_5.2.2.jar
  rm ./scripts/table.groovy
  rm herold_5.2.2.jar
  jar cvf herold_5.2.3.jar fonts groovy groovyjarjarantlr
groovyjarjarasm groovyjarjarcommonscli images META-INF org scripts
  java -jar herold_5.2.3.jar -i t.xhtml -o o.xml
Failed to load Main-Class manifest attribute from
herold_5.2.3.jar

What am I missing ?

Thanks

On Wed, Feb 10, 2010 at 12:48 PM, Michael Fuchs ml...@dbdoclet.org wrote:
 Hello Mathieu,

 this is a bug in herold, because I build in a test groovy script by
 mistake. If you remove it from the jar file (/scripts/table.groovy)
 everything should work. I will release a fixed version with full support
 for customization via groovy and accompanying documents as soon as
 possible.

 Regards
 Michael

 Am Mittwoch, den 10.02.2010, 10:25 +0100 schrieb Mathieu Malaterre:
 On Thu, Jan 28, 2010 at 9:43 AM, Michael Fuchs ml...@dbdoclet.org wrote:
  Hello Mathieu,
 
  herold produces DocBook5, which has no ulink element at all. Therefore
  the linking is based on xlink.

 Thanks !

 BTW I found out herold does not support table/

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
     http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 titlet/title
 /head
 body
 table border=0 cellspacing=0 cellpadding=0 width=800
 tr
 td
 hello
 /td
 /tr
 /table
 /body
 /html


 leads to:

 ?xml version=1.0 encoding=UTF-8?
 article version=1.0 xmlns=http://docbook.org/ns/docbook;
 xmlns:xl=http://www.w3.org/1999/xlink;
   info
     titlet/title
   /info
   row
     entrypara hello /para/entry
   /row
 /article

 I am forwarding that to the dbdoclet mailing list...oh well








-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Xref is only supported to listitems in an orderedlist:

2010-02-18 Thread Mathieu Malaterre
hi,

  I am trying to track down an error reported during the xsltproc
transformation:

...
Xref is only supported to listitems in an orderedlist:
...

What I do not understand is that xmllint does not report any issue. Is
there a way for me to print out the line number where this error occur
in my input XML document.
Steps:

 xsltproc --stringparam keep.relative.image.uris 1 --xinclude
/usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl
input.xml

Validation step does not return any error:
xmllint --xinclude --postvalid --noout --nonet input.xml

Thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: Xref is only supported to listitems in an orderedlist:

2010-02-18 Thread Mathieu Malaterre
On Thu, Feb 18, 2010 at 4:48 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 hi,

  I am trying to track down an error reported during the xsltproc
 transformation:

 ...
 Xref is only supported to listitems in an orderedlist:
 ...

 What I do not understand is that xmllint does not report any issue. Is
 there a way for me to print out the line number where this error occur
 in my input XML document.
 Steps:

  xsltproc --stringparam keep.relative.image.uris 1 --xinclude
 /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl
 input.xml

 Validation step does not return any error:
 xmllint --xinclude --postvalid --noout --nonet input.xml

I found out this is caused by something like:


  itemizedlist
listitem
  paraanchor id=myidx/bla/para
/listitem
  /itemizedlist
xref linkend=myidx/

what I do not understand is that the error message is incapable of
displaying any context information or line number to help me find the
missing xreflabel attribute...

the XSL is:

$ cat docbook-xsl/common/gentext.xsl
...
  xsl:message
xsl:textXref is only supported to listitems in an/xsl:text
xsl:text orderedlist: /xsl:text
xsl:value-of select=@id|@xml:id/
  /xsl:message

Thanks for suggestions,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Re: Xref is only supported to listitems in an orderedlist:

2010-02-19 Thread Mathieu Malaterre
On Fri, Feb 19, 2010 at 6:20 PM, Bob Stayton b...@sagehill.net wrote:
 Hi Mathieu,
 xmllint does not report this as an issue because it is valid DocBook, in
 that the linkend value matches some id value in the document.

 However, the stylesheet is trying to generate link text for the xref and is
 failing. An xref requires that text be generated from the target element,
 but some elements do not have a simple title or number to reference, and
 that is what you are seeing here.

 The anchor you are linking to is an empty element so it is not suitable. For
 such elements, the stylesheet looks at the parent element and tries to use
 that to generate the text.  The parent here is a para, which is also
 unsuitable because it can contain unlimited text and many other elements,
 including block elements.  So the stylesheet goes up again, trying the
 listitem.  Since this is an itemizedlist rather than an orderedlist, such a
 listitem also does not have suitable text for a generated xref. At that
 point, it gives up and issues the error message.

 What is lost here is the id of the original target element.  The recursion
 up the line of ancestors should keep track of that.  That's a bug that
 should be fixed.  If you care to file a bug report on the DocBook
 SourceForge site with your example, that would be great.

Here you go:
https://sourceforge.net/tracker/?func=detailaid=2955077group_id=21935atid=373747

Let me know if you need more information.

Thanks a bunch for your clarification, I did not fully understood the
behavior. This is now crystal clear :)

 My question is, what do you expect such an xref to display in the output?

I was simply given a set of 70 XML docbook files, and my task was to
find the problematic anchor/ elements...

Thanks,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] XSLT Highlighter: Cannot read xslthl-config.xml, no custom highlighters will be available.

2010-02-22 Thread Mathieu Malaterre
Hi there,

  Just a quick info since it took me quite some time, on linux
(debian) the solution :

xsl:param name=highlight.xslthl.config
select=/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/


  simply *does not* work. You have to use the -D option:

$  java -classpath
/usr/share/java/saxon.jar:/home/mathieu/Software/xslthl/xslthl-2.0.1.jar
 
-Dxslthl.config=file:home/mathieu/Software/xslthl/highlighters/xslthl-config.xml
 com.icl.saxon.StyleSheet  -o myfile.html myinput.xml myhtml.xsl

With a cusomization layer such as:


?xml version='1.0'?
xsl:stylesheet
xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0
xsl:import 
href=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl/
xsl:import 
href=/usr/share/xml/docbook/stylesheet/docbook-xsl/highlighting/common.xsl/
xsl:import 
href=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/highlight.xsl/
xsl:param name=highlight.source select=1/
!-- does not work: --
!--xsl:param name=highlight.xslthl.config
select=file:home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/--
!-- does not work: --
!--xsl:param name=highlight.xslthl.config
select=/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/--
/xsl:stylesheet

HTH
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] XSLT Highlighter: Cannot read xslthl-config.xml, no custom highlighters will be available.

2010-02-23 Thread Mathieu Malaterre
On Mon, Feb 22, 2010 at 7:26 PM, Daniel Leidert
daniel.leidert.s...@gmx.net wrote:
 Am Montag, den 22.02.2010, 11:04 +0100 schrieb Mathieu Malaterre:

   Just a quick info since it took me quite some time, on linux
 (debian) the solution :

 xsl:param name=highlight.xslthl.config
 select=/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/

 Please use

 xsl:param name=highlight.xslthl.config select='path'/

 (note the single quotation marks) or

 xsl:param name=highlight.xslthl.configpath/xsl:param

Both:

xsl:param name=highlight.xslthl.config
select='/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml'/
and
xsl:param 
name=highlight.xslthl.config/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/xsl:param

fails with:

$  java -classpath
/usr/share/java/saxon.jar:/home/mathieu/Software/xslthl/xslthl-2.0.1.jar
   com.icl.saxon.StyleSheet  -o myfile.html input.xml myhtml.xsl
Loading Xslthl configuration from
/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml...
XSLT Highlighter: Cannot read xslthl-config.xml, no custom
highlighters will be available.

Without your help I was getting:

$  java -classpath
/usr/share/java/saxon.jar:/home/mathieu/Software/xslthl/xslthl-2.0.1.jar
   com.icl.saxon.StyleSheet  -o myfile.html input.xml myhtml.xsl
Loading Xslthl configuration from xslthl-config.xml...
XSLT Highlighter: Cannot read xslthl-config.xml, no custom
highlighters will be available.

[pay attention to the second line of output]

So at least the xml path to xslthl-config.xml seems to be read in
properly now (thanks!), but still there is something funky going on.
I'll try with saxonb...

2cts
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] XSLT Highlighter: Cannot read xslthl-config.xml, no custom highlighters will be available.

2010-02-23 Thread Mathieu Malaterre
On Tue, Feb 23, 2010 at 10:14 AM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 On Mon, Feb 22, 2010 at 7:26 PM, Daniel Leidert
 daniel.leidert.s...@gmx.net wrote:
 Am Montag, den 22.02.2010, 11:04 +0100 schrieb Mathieu Malaterre:

   Just a quick info since it took me quite some time, on linux
 (debian) the solution :

 xsl:param name=highlight.xslthl.config
 select=/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/

 Please use

 xsl:param name=highlight.xslthl.config select='path'/

 (note the single quotation marks) or

 xsl:param name=highlight.xslthl.configpath/xsl:param

 Both:

 xsl:param name=highlight.xslthl.config
 select='/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml'/
 and
 xsl:param 
 name=highlight.xslthl.config/home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/xsl:param

 fails with:

 $  java -classpath
 /usr/share/java/saxon.jar:/home/mathieu/Software/xslthl/xslthl-2.0.1.jar
   com.icl.saxon.StyleSheet  -o myfile.html input.xml myhtml.xsl
 Loading Xslthl configuration from
 /home/mathieu/Software/xslthl/highlighters/xslthl-config.xml...
 XSLT Highlighter: Cannot read xslthl-config.xml, no custom
 highlighters will be available.

 Without your help I was getting:

 $  java -classpath
 /usr/share/java/saxon.jar:/home/mathieu/Software/xslthl/xslthl-2.0.1.jar
   com.icl.saxon.StyleSheet  -o myfile.html input.xml myhtml.xsl
 Loading Xslthl configuration from xslthl-config.xml...
 XSLT Highlighter: Cannot read xslthl-config.xml, no custom
 highlighters will be available.

 [pay attention to the second line of output]

 So at least the xml path to xslthl-config.xml seems to be read in
 properly now (thanks!), but still there is something funky going on.
 I'll try with saxonb...

Silly me. The proper solution was simply:

xsl:param 
name=highlight.xslthl.configfile:home/mathieu/Software/xslthl/highlighters/xslthl-config.xml/xsl:param

Sorry for the noise.

-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Convert OpenDocument Presentation [.odp] to docbook

2010-02-24 Thread Mathieu Malaterre
Hi there,

  After reading the recent post about converting OpenOffice document
to docbook. I tried using OO to convert an old presentation (in odp)
to docbook. However I cannot select docbook as output format from the
GUI. Does anyone knows if this is possible ? Or is there another way
to convert an odp to docbook ?

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Convert OpenDocument Presentation [.odp] to docbook

2010-02-24 Thread Mathieu Malaterre
On Wed, Feb 24, 2010 at 1:19 PM, Markus Hoenicka
markus.hoeni...@mhoenicka.de wrote:
 Mathieu Malaterre mathieu.malate...@gmail.com was heard to say:

  After reading the recent post about converting OpenOffice document
 to docbook. I tried using OO to convert an old presentation (in odp)
 to docbook. However I cannot select docbook as output format from the
 GUI. Does anyone knows if this is possible ? Or is there another way
 to convert an odp to docbook ?


 OO allows to save presentations to HTML though. I've never tried that, but
 you may be able to recover the textual information and maybe some of the
 structural information from there.

I gave it a shot. I have lost all complex figures (multiples images)
and all vectorial drawing are also lost...

Thanks anyway,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] hellip; vs xmllint

2010-02-25 Thread Mathieu Malaterre
hi there,

  I have written a couple of Makefile rules to check my docbook XML is
valid. for this task I used xmllint. It used to work pretty nicely up
to now. Could someone please let me know what is the issue with the
following:

$ cat test.xml
?xml version='1.0' encoding='UTF-8'?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
docbookV4.5/docbookx.dtd
article
  section
title/
  parahellip; is ok here/para
  /section
  xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=section.xml/
/article
$ cat section.xml
?xml version='1.0' encoding='UTF-8'?
  section
title/
  paraamp; is ok/para
  parahellip; is not ok/para
  /section

$ xmllint --xinclude --postvalid --noout --nonet test.xml
section.xml:5: parser error : Entity 'hellip' not defined
  parahellip; is not ok/para
^
test.xml:8: element include: XInclude error : could not load
section.xml, and no fallback was found
test.xml:3: element article: validity error : Element article content
does not follow the DTD, expecting ((title , subtitle? ,
titleabbrev?)? , articleinfo? , tocchap? , lot* , (((calloutlist |
glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist |
simplelist | variablelist | caution | important | note | tip | warning
| literallayout | programlisting | programlistingco | screen |
screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis |
classsynopsis | fieldsynopsis | constructorsynopsis |
destructorsynopsis | methodsynopsis | formalpara | para | simpara |
address | blockquote | graphic | graphicco | mediaobject |
mediaobjectco | informalequation | informalexample | informalfigure |
informaltable | equation | example | figure | table | msgset |
procedure | sidebar | qandaset | task | anchor | bridgehead | remark |
highlights | abstract | authorblurb | epigraph | indexterm |
beginpage)+ , (sect1* | refentry* | simplesect* | section*)) | sect1+
| refentry+ | simplesect+ | section+) , (toc | lot | index | glossary
| bibliography | appendix | colophon | ackno)*), got (section
xi:include )
test.xml:8: element include: validity error : No declaration for element include
test.xml:8: element include: validity error : No declaration for
attribute href of element include
test.xml:8: element include: validity error : No declaration for
attribute xmlns:xi of element include
Document test.xml does not validate


Thanks a bunch !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] hellip; vs xmllint

2010-02-25 Thread Mathieu Malaterre
Ah that explains it !

amp; is special. One has to repeat the !DOCTYPE declaration within
each file. the xi:include is not exactly working as I thought.

$ cat section.xml
?xml version='1.0' encoding='UTF-8'?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 docbookV4.5/docbookx.dtd
section
  title/
  paraamp; is ok/para
  parahellip; is ok now/para
/section


On Thu, Feb 25, 2010 at 12:44 PM, Dominic Weiss d.we...@com4cure.de wrote:
 Hi,
 maybe this will help you:

 http://infohost.nmt.edu/tcc/help/pubs/docbook43/special-chars.html

 and take a look there, too:

 http://www.web-source.net/symbols.htm

 Maybe I´m wrong, I'm still new in docbook-dev :-)

 Greetings
 Dominic



 -Ursprüngliche Nachricht-
 Von: Mathieu Malaterre [mailto:mathieu.malate...@gmail.com]
 Gesendet: Donnerstag, 25. Februar 2010 12:32
 An: DocBook Apps
 Betreff: [docbook-apps] hellip; vs xmllint

 hi there,

  I have written a couple of Makefile rules to check my docbook XML is
 valid. for this task I used xmllint. It used to work pretty nicely up
 to now. Could someone please let me know what is the issue with the
 following:

 $ cat test.xml
 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 docbookV4.5/docbookx.dtd
 article
  section
    title/
      parahellip; is ok here/para
  /section
  xi:include xmlns:xi=http://www.w3.org/2001/XInclude; href=section.xml/
 /article
 $ cat section.xml
 ?xml version='1.0' encoding='UTF-8'?
  section
    title/
      paraamp; is ok/para
      parahellip; is not ok/para
  /section

 $ xmllint --xinclude --postvalid --noout --nonet test.xml
 section.xml:5: parser error : Entity 'hellip' not defined
      parahellip; is not ok/para
                    ^
 test.xml:8: element include: XInclude error : could not load
 section.xml, and no fallback was found
 test.xml:3: element article: validity error : Element article content
 does not follow the DTD, expecting ((title , subtitle? ,
 titleabbrev?)? , articleinfo? , tocchap? , lot* , (((calloutlist |
 glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist |
 simplelist | variablelist | caution | important | note | tip | warning
 | literallayout | programlisting | programlistingco | screen |
 screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis |
 classsynopsis | fieldsynopsis | constructorsynopsis |
 destructorsynopsis | methodsynopsis | formalpara | para | simpara |
 address | blockquote | graphic | graphicco | mediaobject |
 mediaobjectco | informalequation | informalexample | informalfigure |
 informaltable | equation | example | figure | table | msgset |
 procedure | sidebar | qandaset | task | anchor | bridgehead | remark |
 highlights | abstract | authorblurb | epigraph | indexterm |
 beginpage)+ , (sect1* | refentry* | simplesect* | section*)) | sect1+
 | refentry+ | simplesect+ | section+) , (toc | lot | index | glossary
 | bibliography | appendix | colophon | ackno)*), got (section
 xi:include )
 test.xml:8: element include: validity error : No declaration for element 
 include
 test.xml:8: element include: validity error : No declaration for
 attribute href of element include
 test.xml:8: element include: validity error : No declaration for
 attribute xmlns:xi of element include
 Document test.xml does not validate


 Thanks a bunch !
 --
 Mathieu

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org








-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Convert OpenDocument Presentation [.odp] to docbook

2010-03-02 Thread Mathieu Malaterre
On Wed, Feb 24, 2010 at 1:40 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 On Wed, Feb 24, 2010 at 1:19 PM, Markus Hoenicka
 markus.hoeni...@mhoenicka.de wrote:
 Mathieu Malaterre mathieu.malate...@gmail.com was heard to say:

  After reading the recent post about converting OpenOffice document
 to docbook. I tried using OO to convert an old presentation (in odp)
 to docbook. However I cannot select docbook as output format from the
 GUI. Does anyone knows if this is possible ? Or is there another way
 to convert an odp to docbook ?


 OO allows to save presentations to HTML though. I've never tried that, but
 you may be able to recover the textual information and maybe some of the
 structural information from there.

 I gave it a shot. I have lost all complex figures (multiples images)
 and all vectorial drawing are also lost...


Just FYI. The export function from OpenOffice 3.1 (debian/linux) did
not work for me. Any graphic with vectorial stuff were badly exported,
or worse where not even legal SVG file.

I found out one can achieve decent result, by exporting the odp to
pdf. Then use pdf2svg:

http://www.cityinthesky.co.uk/pdf2svg.html

Please note that any text is simply lost, as fonts are converted to
vectorial objects.

HTH
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] saxon: docbookV4.5/docbookx.dtd (No such file or directory)

2010-03-17 Thread Mathieu Malaterre
Hi there,

  I am trying to understand what so different in how catalog are
handled in between xsltproc and saxon (I need to be able to use one or
the other). Basically is the following legal:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
docbookV4.5/docbookx.dtd []
article
...

I cannot make it work using saxon 6.5.5 on a debian machine. It fails with:

java  -cp 
/etc/xml/resolver:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
com.icl.saxon.StyleSheet -x
org.apache.xml.resolver.tools.ResolvingXMLReader  -y
org.apache.xml.resolver.tools.ResolvingXMLReader -r
org.apache.xml.resolver.tools.CatalogResolver  -u -o toto in2.xml
/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
Error
  Failure reading file:tmp/in2.xml: /tmp/docbookV4.5/docbookx.dtd
(No such file or directory)
Transformation failed: Run-time errors were reported

However the following is working:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
...


Looking at the catalog I have:

$ grep //OASIS//DTD DocBook XML /etc/xml/catalog
delegatePublic publicIdStartString=-//OASIS//DTD DocBook XML
catalog=file:///etc/xml/docbook-xml.xml/

$ grep http://www.oasis-open.org/docbook/xml /etc/xml/catalog
delegateSystem
systemIdStartString=http://www.oasis-open.org/docbook/xml/;
catalog=file:///etc/xml/docbook-xml.xml/

Does this means Saxon does not take into account 'delegatePublic' ?

Thanks,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] saxon: docbookV4.5/docbookx.dtd (No such file or directory)

2010-03-17 Thread Mathieu Malaterre
On Wed, Mar 17, 2010 at 5:40 PM, Keith Fahlgren abdela...@gmail.com wrote:
 On Wed, Mar 17, 2010 at 9:30 AM, Mathieu Malaterre
 mathieu.malate...@gmail.com wrote:
 I cannot make it work using saxon 6.5.5 on a debian machine. It fails with:

 java  -cp 
 /etc/xml/resolver:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader  -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver  -u -o toto in2.xml
 /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl

 Do you have a CatalogManager.properties file in your CLASSPATH that
 points to your XML Catalog? IIRC, xsltproc always checks
 /etc/xml/catalog by default, but Saxon needs to have it specified.
 More in Bob Stayton's book:
 http://www.sagehill.net/docbookxsl/UseCatalog.html#UsingCatalogsSaxon

I believe the file is loaded properly, except the matching does not
work in one case. Here is the output when I set verbosity:

# cat /etc/xml/resolver/CatalogManager.properties
catalogs=/etc/xml/catalog
relative-catalogs=yes
verbosity=99
prefer=system
static-catalog=yes
allow-oasis-xml-catalog-pi=yes

This leads to:

Parse catalog: /etc/xml/catalog
Loading catalog: /etc/xml/catalog
Default BASE: file:/etc/xml/catalog
delegatePublic: ISO 8879:1986//ENTITIES
file:///etc/xml/sgml-data.xml
DELEGATE_PUBLIC: ISO 8879:1986//ENTITIES
file:/etc/xml/sgml-data.xml
delegateSystem: /usr/share/sgml/dtd/svg
file:///etc/xml/sgml-data.xml
DELEGATE_SYSTEM: /usr/share/sgml/dtd/svg
file:/etc/xml/sgml-data.xml
delegateSystem: http://docbook.org/xml/
file:///etc/xml/docbook-xml.xml
DELEGATE_SYSTEM: http://docbook.org/xml/
file:/etc/xml/docbook-xml.xml
delegatePublic: -//OASIS//ELEMENTS DocBook
file:///etc/xml/docbook-xml.xml
DELEGATE_PUBLIC: -//OASIS//ELEMENTS DocBook
file:/etc/xml/docbook-xml.xml
delegateSystem: http://docbook.org/xml/5
file:///etc/xml/docbook5-xml.xml
DELEGATE_SYSTEM: http://docbook.org/xml/5
file:/etc/xml/docbook5-xml.xml
delegatePublic: -//OASIS//DTD DocBook XML
file:///etc/xml/docbook-xml.xml
DELEGATE_PUBLIC: -//OASIS//DTD DocBook XML
file:/etc/xml/docbook-xml.xml
delegateSystem: /usr/share/sgml/dtd/qaml-xml.dtd
file:///etc/xml/sgml-data.xml
DELEGATE_SYSTEM: /usr/share/sgml/dtd/qaml-xml.dtd
file:/etc/xml/sgml-data.xml
delegatePublic: -//GlobalTransCorp//DTD XML Catalogs V1.0-Based
Extension V1.0//EN
file:///etc/xml/xml-core.xml
DELEGATE_PUBLIC: -//GlobalTransCorp//DTD XML Catalogs V1.0-Based
Extension V1.0//EN
file:/etc/xml/xml-core.xml
delegatePublic: -//OASIS//DTD XML Exchange Table Model 19990315
file:///etc/xml/docbook-xml.xml
DELEGATE_PUBLIC: -//OASIS//DTD XML Exchange Table Model 19990315
file:/etc/xml/docbook-xml.xml
delegateURI: http://docbook.sourceforge.net/release/xsl/
file:///etc/xml/docbook-xsl.xml
DELEGATE_URI: http://docbook.sourceforge.net/release/xsl/
file:/etc/xml/docbook-xsl.xml
delegateSystem: http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd
file:///etc/xml/xml-core.xml
DELEGATE_SYSTEM: http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd
file:/etc/xml/xml-core.xml
delegatePublic: -//W3C//DTD SVG
file:///etc/xml/sgml-data.xml
DELEGATE_PUBLIC: -//W3C//DTD SVG
file:/etc/xml/sgml-data.xml
delegateSystem: http://docbook.sourceforge.net/release/xsl-ns/
file:///etc/xml/docbook-xsl-ns.xml
DELEGATE_SYSTEM: http://docbook.sourceforge.net/release/xsl-ns/
file:/etc/xml/docbook-xsl-ns.xml
delegatePublic: -//Norman Walsh//DTD DocBook XML
file:///etc/xml/docbook-xml.xml
DELEGATE_PUBLIC: -//Norman Walsh//DTD DocBook XML
file:/etc/xml/docbook-xml.xml
delegatePublic: -//OASIS//DTD DocBook XML 5
file:///etc/xml/docbook5-xml.xml
DELEGATE_PUBLIC: -//OASIS//DTD DocBook XML 5
file:/etc/xml/docbook5-xml.xml
delegateSystem: http://xml.ascc.net/xml/resource/qaml-xml
file:///etc/xml/sgml-data.xml
DELEGATE_SYSTEM: http://xml.ascc.net/xml/resource/qaml-xml
file:/etc/xml/sgml-data.xml
delegatePublic: -//OASIS//ENTITIES DocBook
file:///etc/xml/docbook-xml.xml
DELEGATE_PUBLIC: -//OASIS//ENTITIES DocBook
file:/etc/xml/docbook-xml.xml
delegatePublic: +//ISBN 82-7640-023//DTD Frequently Asked Questions//EN
file:///etc/xml/sgml-data.xml
DELEGATE_PUBLIC: +//ISBN 82-7640-023//DTD Frequently Asked Questions//EN
file:/etc/xml/sgml-data.xml
delegateURI: http://docbook.sourceforge.net/release/xsl-ns/
file:///etc/xml/docbook-xsl-ns.xml
DELEGATE_URI: http://docbook.sourceforge.net/release/xsl-ns/
file:/etc/xml/docbook-xsl-ns.xml
delegatePublic: +//IDN faq.org//DTD Frequently Asked Questions
file:///etc/xml/sgml-data.xml
DELEGATE_PUBLIC: +//IDN faq.org//DTD Frequently Asked Questions

Re: [docbook-apps] saxon: docbookV4.5/docbookx.dtd (No such file or directory)

2010-03-17 Thread Mathieu Malaterre
On Wed, Mar 17, 2010 at 5:54 PM, Keith Fahlgren abdela...@gmail.com wrote:
 On Wed, Mar 17, 2010 at 9:45 AM, Mathieu Malaterre
 mathieu.malate...@gmail.com wrote:
 I believe the file is loaded properly, except the matching does not
 work in one case. Here is the output when I set verbosity:

 # cat /etc/xml/resolver/CatalogManager.properties
 catalogs=/etc/xml/catalog
 relative-catalogs=yes
 verbosity=99
 prefer=system
 static-catalog=yes
 allow-oasis-xml-catalog-pi=yes

 From your catalog file, it looks like you may want prefer=public. Does
 that change the behavior?

D'oh !
I actually *did* read this file, but I simply discarded this option.

Thanks and sorry for the noise,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Saxon: Failed to interpret image: Sketches/Site.svg

2010-03-18 Thread Mathieu Malaterre
Hi there,

  I recently switch from xsltproc to using saxon (I wanted syntax
highlighting). However after the switch saxon keeps complaining about:

...
Failed to interpret image: Sketches/Site.svg
...

  I looked at the output using firefox and everything seems ok. Am I
missing something ? Is there an option to remove this warning ?

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Color Syntax Highlighting (xslthl)

2010-03-22 Thread Mathieu Malaterre
Hi there,

  Does anyone knows why syntax highlighting is displayed as grayscale
in PDF output while it is full of colors in HTML output ?

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Saxon: Failed to interpret image: Sketches/Site.svg

2010-03-23 Thread Mathieu Malaterre
On Thu, Mar 18, 2010 at 6:07 PM, Mauritz Jeanson m...@johanneberg.com wrote:
 |  -Original Message-
 |  From: Mathieu Malaterre
 |
 |  ...
 |  Failed to interpret image: Sketches/Site.svg
 |  ...
 |
 |    I looked at the output using firefox and everything seems ok. Am I
 |  missing something ? Is there an option to remove this warning ?


 The warning comes from the Saxon graphic size extension, which does not
 support SVG images. The only way to remove the warning is to set the
 graphicsize.extension parameter to 0.

Thanks ! It now properly respect imagedata width=100%/.


-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] debian: FOP and %isotech in PDF output

2010-04-09 Thread Mathieu Malaterre
Hi there,

  I am trying to understand how to configure fop to properly generate
proper PDF file when input XML contains unicode from -say- %isotech.
Is there a way to tell fop to fail when output will be incorrect
(fonts does not contains a particular symbols) ?
Is there a fonts I should be using on my debian/linux system that
contains everything (I need at least %isotech).


Thanks a bunch !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: debian: FOP and %isotech in PDF output

2010-04-09 Thread Mathieu Malaterre
On Fri, Apr 9, 2010 at 9:45 AM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi there,

  I am trying to understand how to configure fop to properly generate
 proper PDF file when input XML contains unicode from -say- %isotech.
 Is there a way to tell fop to fail when output will be incorrect
 (fonts does not contains a particular symbols) ?
 Is there a fonts I should be using on my debian/linux system that
 contains everything (I need at least %isotech).

I was lucky and finally found this thread

http://www.mail-archive.com/fop-us...@xmlgraphics.apache.org/msg13104.html

which leads back to Bob Stayton -excellent- reference:

http://www.sagehill.net/docbookxsl/SpecialChars.html#SwitchSymbol

HTH
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: debian: FOP and %isotech in PDF output

2010-04-09 Thread Mathieu Malaterre
On Fri, Apr 9, 2010 at 10:25 AM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 On Fri, Apr 9, 2010 at 9:45 AM, Mathieu Malaterre
 mathieu.malate...@gmail.com wrote:
 Hi there,

  I am trying to understand how to configure fop to properly generate
 proper PDF file when input XML contains unicode from -say- %isotech.
 Is there a way to tell fop to fail when output will be incorrect
 (fonts does not contains a particular symbols) ?
 Is there a fonts I should be using on my debian/linux system that
 contains everything (I need at least %isotech).

 I was lucky and finally found this thread

 http://www.mail-archive.com/fop-us...@xmlgraphics.apache.org/msg13104.html

 which leads back to Bob Stayton -excellent- reference:

 http://www.sagehill.net/docbookxsl/SpecialChars.html#SwitchSymbol

Just FYI, the hint works for:
- prime;
- Prime;

but not for
- tprime;

Is there a way to know which fonts actually supports all iso-tech ?

Thanks
-- 
Mathieu
ref:
http://oreilly.com/catalog/docbook/book2/iso-tech.html

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] roundtrip - normalise-common.xsl - customization and section numbering

2010-04-10 Thread Mathieu Malaterre
Hi there,

  I am trying to customize normalise-common.xsl to remap the custom
style to proper 'known names' for wordml rountrip. I am hitting a
small issue here. Here is my custom normalise-common.xsl:

  xsl:template name='rnd:map-paragraph-style'
xsl:param name='style'/
xsl:choose
  xsl:when test='$style = Heading1'sect1-title/xsl:when
  xsl:when test='$style = Heading2'sect2-title/xsl:when
  xsl:when test='$style = Heading3'sect3-title/xsl:when
  xsl:when test='$style = Heading4'sect4-title/xsl:when
  xsl:when test='$style = Heading5'sect5-title/xsl:when
...

However I do not understand:
1. how I can handle Heading6, Heading7 and Heading8 (they are present
in my original Word document).
2. This might be related to (1). How do I handle mismatch in original
document such as:

ERROR bad-title: title style sect4-title mismatches parent sect2
ERROR bad-title: title style sect5-title mismatches parent sect3

Basically would it be possible to handle the generic 'section' docbook element ?

Thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Colored listings

2010-04-13 Thread Mathieu Malaterre
2010/4/13 Александр Мартынов am...@mail.ru:
 But listings are still black and white. I'm looking in generated .fo
 and found that there is no differences with xsltproc generated .fo.

Try HTML output. You'll see that Syntax Highlithing is working. PDF
output by default will display shade or gray (AFAIK). You need even
more toying to get actual 'color'.

HTH
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Colored listings

2010-04-13 Thread Mathieu Malaterre
2010/4/13 Александр Мартынов am...@mail.ru:
 Hello Mathieu,

 I try to generate html using next bat file:

 --- mkhtml.bat ---
 java -cp 
 F:\work\docbook-tools\syntax-hl\xslthl-2.0.1.jar;F:\work\docbook-tools\syntax-hl\saxonhe9-2-0-6j\saxon9he.jar^
  net.sf.saxon.Transform^
  -o:%2^
  -s:%1^
  -xsl:%~dp0\..\docbook-xsl\html\docbook.xsl^

I am not using docbook-xsl/fo/docbook.xsl when doing highlithing.
Instead I use: docbook-xsl/fo/highlight.xsl

Ref:
http://www.sagehill.net/docbookxsl/SyntaxHighlighting.html

-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] General question about creating docbook documents (maybe OT)

2010-04-14 Thread Mathieu Malaterre
On Wed, Apr 14, 2010 at 10:02 AM, Frank Arensmeier fr...@nikemedia.se wrote:
 Hi there.

 I would like to ask the list members: how do you create docbook-compilant
 XML documents? What does your workflow looks like so to say? Do you write
 XML files in a XML editor? A web interface? My apologies if this is slightly
 off topic.

I started working with docbook a couple of months back, so my
experience is very limited. Since we do software, we are internally
using cmake+ctest+cdash for managing our regression technique.
All I had to do is write a custom cmake script so that instead of
compilation errors, I know reports error of xmllint --valid. I also
catch error (on stdout) when running fop, and xstlproc.

I personnally use vim + serna to edit docbook (both are debian
packages), some coworkers uses emacs and I think one is using XXE at
times.

Cheers
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] General question about creating docbook documents (maybe OT)

2010-04-14 Thread Mathieu Malaterre
On Wed, Apr 14, 2010 at 6:38 PM, Frank Arensmeier fr...@nikemedia.se wrote:
 Hello Mathieu.

 So it seems that you have to deal with more or less highly skilled
 programmers then, not average endusers, right? One big problem for my part
 was that most of the more common workflow outlines I found on the net were
 incorporating e.g. Oxygen or similar editors. Because we needed a tool that
 even users with only limited IT knowledge could use without too much
 trouble, those workflows where just too complicated.

The dev team was actually used to write HTML documentation so the move
to XML was pretty much painless. But I do agree those people are
'geeks', and even some use bépo (french dvorak) to write in UTF-8 :)

 Docbook in combination with XSL-FO is a great thing. But it seems to me that
 there is a gap to fill for user friendly authoring systems.

Again I have very little experience. I am hoping that people will just
mimics or simply copy-paste complicated docbook chunks. I only ask
people to write documentation that pass xmllint validation. A nightly
cron-job rebuilds the documentation to check the layout was actually
correct.

2cts
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Converting Symbol Fonts to UTF-8

2010-04-15 Thread Mathieu Malaterre
Hi there,

  I am wondering if anyone has dealt with this issue before: how can I
convert a text that was written using the 'Symbol' fonts into
something more portable (UTF-8 for instance) ?

Thanks
-- 
Mathieu
Ref: http://www.openoffice.org/issues/show_bug.cgi?id=110872

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] CSS and docbook 5

2010-04-15 Thread Mathieu Malaterre
On Thu, Apr 15, 2010 at 5:49 PM, Dave Pawson da...@dpawson.co.uk wrote:

 Robin Berjon showed an xml docbook 5 document at xmlprague.
 It was styled by CSS (with odd extensions).

 To me it showed the way forward.

 He's kindly hosted it on his site
 http://berjon.com/tmp/docbook-css/docbook.xml

Love it !

Thanks for the link
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Word 2007+ to DocBook

2010-05-12 Thread Mathieu Malaterre
Greg,

  Here is my 2cts. I also used OO.org to convert from .doc (yes the
old binary format) to docbook. However even if I submited bug report +
patch:
http://www.openoffice.org/issues/show_bug.cgi?id=110762
http://www.openoffice.org/issues/show_bug.cgi?id=110872
  there hasn't been any change in OO.org. I am not to sure about
docbook support in OO.org.

  I also used at some point Steve Ball rountrip stuff, but again none
of the bug I reported have been fixed:

http://sourceforge.net/tracker/?limit=25func=group_id=21935atid=373747assignee=status=category=artgroup=keyword=submitter=malatartifact_id=assignee=status=category=artgroup=submitter=malatkeyword=roundtripartifact_id=submit=Filter

  So I would not expect too much in those directions. I have heard
good things about majix. So I would suggest you maintain documentation
in docbook and only generates (one-way) RTF for WinWord people.

HTH

On Fri, May 7, 2010 at 3:20 PM,  gpev...@aol.com wrote:
 Steve:

 Thanks for the reply. I think I was a little unclear regarding the roundtrip
 aspect.
 I am not so interested in round trip, (but it would be nice to
 have) primarily I want to go one way into word.
 However the stylesheets I found happened to be in the 1.75.2/roundtrip
 directory.

 I do appreciate the info on the docx files. I had known that the Microsoft
 Word .docx format is essentially a zip file with a whole bunch of XML files
 in there, but was not aware that the main document content was in
 document.xml
 I have looked at that file, it is still really ugly straight out of word,
 but I am going to concentrate on refining that document down and see if that
 yields any better results. Investigation ongoing.

 Another option I had tried was to use openoffice.org writer as it has save
 as docbook.xml, seemed promising but I am not really impressed with the
 resulting XML.
 I tried a couple of approaches, one was to save the document in Word as
 .odt, then in OpenOffice Writer save as a docbook.xml...
 The other approach was to just open the word doc in openoffice, and let oo
 convert it and then save as docbook.
 That approach generated xml document that validated, but there are still
 some things (really ugly!) that I would like to see improvement.
 I wrote a few custom xslt to clean up some of it, and that is also ongoing
 work in progress.
 I would love to hear some other suggestions/options if anyone has already
 gone through all this!
 If you don't mind, when you do have a decent round trip scenario worked out,
 sharing it, just e-mail me directly, or post a link here. As I said
 initially I got lots of advice from old discussions here in the archives,
 who knows perhaps this can help someone else down the line.
 It would be very nice to have.

 Thank you very much for your kind reply!
 /Greg



 -Original Message-
 From: Steve Ball steve.b...@explain.com.au
 To: gpev...@aol.com
 Cc: docbook-apps@lists.oasis-open.org
 Sent: Thu, May 6, 2010 6:49 pm
 Subject: Re: [docbook-apps] Word 2007+ to DocBook

 Hi,
 The stylesheet structure was rationalised for the 1.75.2 release so that
 Word, Pages and OpenOffice formats could all be supported. There is a
 stylesheet for each of those formats that normalises the document to a
 common format, and then the other stylesheets take the document through to
 structured DocBook.
 Office 2007 basically uses WordML under-the-hood, and a .docx file is
 really just a Zip file containing the XML documents. The one with the
 document content is word/document.xml. It wouldn't be too much work to
 upgrade the roundtrip stylesheets to handle this document; basically it is
 just the XML Namespace URIs that have changed.
 I'm working on libxslt at the moment (implementing XSLT 2.0), so haven't
 really got time to look at the roundtripping stuff. However, email me
 directly if you have any further questions.
 Cheers,
 Steve Ball
 On 07/05/2010, at 6:29 AM, gpev...@aol.com wrote:

 Howdy DocBook Community:

 I am new to DocBook, and also new to this forum. I have been going through
 the archives, and found some very interesting discussions. Primarily I am
 interested in moving/converting some documents from Word which they were
 authored in to DocBook.
 I have been looking at several tools to help in this process, and found some
 very good information here in the archives.
 One method which seems very promising is the docbook-xsl/roundtrip
 The discussion for this was from a few years ago. So I am thinking that
 the some of the style sheets may have changed with the docbook-xsl-1.75.2
 distro that I have. The suggested conversions were:

  wordml-normalise.xsl, wordml-sections.xsl, wordml-blocks.xsl,
 wordml-final.xsl

 none of which I found in the 1.75.2
 Instead I have xsl such as:
 normalise-common.xsl, normalise2sections.xsl, sections2blocks.xsl, and
 blocks2dbk.xsl

 It seems to me that this is just the logical evolution of the same xsl style
 sheets referenced in the archives from years ago. Does anyone know 

[docbook-apps] Basic use of WordML roundtrip

2010-05-30 Thread Mathieu Malaterre
Hi there,

  I am trying to understand how to use wordml rountrip. I figure I
could try first to generate a wordml from a docbook and then back
again to docbook. I tried with the following:

article xmlns=http://docbook.org/ns/docbook; version=5.0
  sectioninfotitleMy Title/title/info
  /section
/article

Which was converted to WordML (using docbook 1.75.2), and then back
again to docbook:

?xml version=1.0?
info xmlns=http://docbook.org/ns/docbook;
  dbk:info xmlns:dbk=http://docbook.org/ns/docbook;
dbk:titleMy Title/dbk:title
  /dbk:info
/info

The output does not mention anymore that it was an article. Are there
any minimal example on how to use WordML rountrip out there ? Where
can I find the basic unit test for it ?

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: Basic use of WordML roundtrip

2010-05-30 Thread Mathieu Malaterre
If this is of any help, the temporary blocks.xml file is:

?xml version=1.0?
dbk:article xmlns:dbk=http://docbook.org/ns/docbook;
xmlns:d=http://docbook.org/ns/docbook;
xmlns:rnd=http://docbook.org/ns/docbook/roundtrip;
xmlns:xlink=http://www.w3.org/1999/xlink;
  dbk:para rnd:style=info-titleMy Title/dbk:para
/dbk:article


So blocks2dbk.xsl is the script that drop the 'article' information...

On Sun, May 30, 2010 at 3:56 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi there,

  I am trying to understand how to use wordml rountrip. I figure I
 could try first to generate a wordml from a docbook and then back
 again to docbook. I tried with the following:

 article xmlns=http://docbook.org/ns/docbook; version=5.0
  sectioninfotitleMy Title/title/info
  /section
 /article

 Which was converted to WordML (using docbook 1.75.2), and then back
 again to docbook:

 ?xml version=1.0?
 info xmlns=http://docbook.org/ns/docbook;
  dbk:info xmlns:dbk=http://docbook.org/ns/docbook;
    dbk:titleMy Title/dbk:title
  /dbk:info
 /info

 The output does not mention anymore that it was an article. Are there
 any minimal example on how to use WordML rountrip out there ? Where
 can I find the basic unit test for it ?

 Thanks
 --
 Mathieu




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Using screenco ?

2010-06-03 Thread Mathieu Malaterre
Hi there,

  Is anyone using screenco on a typical debian installation ? I am
attaching the input docbook I am using. I cannot get neither the PDF
output to work, nor the HTML output.

Compilation for HTML is:

/usr/lib/jvm/default-java/bin/java -cp
/etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
com.icl.saxon.StyleSheet -x
org.apache.xml.resolver.tools.ResolvingXMLReader -y
org.apache.xml.resolver.tools.ResolvingXMLReader -r
org.apache.xml.resolver.tools.CatalogResolver -u MyTest.xml
/usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl
callouts.extension=1 use.extensions=1 keep.relative.image.uris=1

Compilation for PDF is:

/usr/lib/jvm/default-java/bin/java -cp
/etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
com.icl.saxon.StyleSheet -x
org.apache.xml.resolver.tools.ResolvingXMLReader -y
org.apache.xml.resolver.tools.ResolvingXMLReader -r
org.apache.xml.resolver.tools.CatalogResolver -u -o MyTest.fo
MyTest.xml /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
fop1.extensions=1 callouts.extension=1 use.extensions=1
/usr/bin/fop -fo MyTest.fo -pdf MyTest.pdf

As you can see the last callout is missing. For PDF the output is
missing the complete list of callouts.

Thanks for suggestions,
-- 
Mathieu
 Volume in drive C is SYSTEM Serial number is 2350:717C
 Directory of  C:\

10/17/97   9:04 DIRbin
10/16/97  14:11 DIRDOS   
10/16/97  14:40 DIRProgram Files
10/16/97  14:46 DIRTEMP
10/17/97   9:04 DIRtmp
10/16/97  14:37 DIRWINNT
10/16/97  14:25 119  AUTOEXEC.BAT  
 2/13/94   6:21  54,619  COMMAND.COM   
10/16/97  14:25 115  CONFIG.SYS
11/16/97  17:17  61,865,984  pagefile.sys
 2/13/94   6:21   9,349  WINA20.386
This directory holds MS-DOS, the
operating system that was installed before Windows
NT.

System startup code for DOS.

Some sort of Windows 3.1 hack for some 386 processors,
as I recall.


MyTest.pdf
Description: Adobe PDF document
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.2//EN
  http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd;
article
title/
screenco
areaspec
area id=dos coords='5'/
area id=autoexec.bat coords='10'/
area id=command.com coords='11'/
area id=config.sys coords='12'/
area id=wina20.386 coords='14'/
/areaspec
screen Volume in drive C is SYSTEM Serial number is 2350:717C
 Directory of  C:\

10/17/97   9:04 lt;DIRbin
10/16/97  14:11 lt;DIRDOS
10/16/97  14:40 lt;DIRProgram Files
10/16/97  14:46 lt;DIRTEMP
10/17/97   9:04 lt;DIRtmp
10/16/97  14:37 lt;DIRWINNT
10/16/97  14:25 119  AUTOEXEC.BAT
 2/13/94   6:21  54,619  COMMAND.COM
10/16/97  14:25 115  CONFIG.SYS
11/16/97  17:17  61,865,984  pagefile.sys
 2/13/94   6:21   9,349  WINA20.386/screen
calloutlist
callout arearefs=dos
para
This directory holds trademarkMS-DOS/trademark, the
operating system that was installed before trademarkWindows
NT/trademark.
/para
/callout

callout arearefs=autoexec.bat command.com config.sys
para
System startup code for DOS.
/para
/callout

callout arearefs=wina20.386
para
Some sort of trademarkWindows 3.1/trademark hack for some 386 processors,
as I recall.
/para
/callout
/calloutlist
/screenco
/article

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

[docbook-apps] Re: Using screenco ?

2010-06-03 Thread Mathieu Malaterre
I finally could get most callouts to work in PDF using comment from:

http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg14075.html

but still the very last callout remains invisible in both HTML and PDF output...

On Thu, Jun 3, 2010 at 4:57 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi there,

  Is anyone using screenco on a typical debian installation ? I am
 attaching the input docbook I am using. I cannot get neither the PDF
 output to work, nor the HTML output.

 Compilation for HTML is:

 /usr/lib/jvm/default-java/bin/java -cp
 /etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver -u MyTest.xml
 /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl
 callouts.extension=1 use.extensions=1 keep.relative.image.uris=1

 Compilation for PDF is:

 /usr/lib/jvm/default-java/bin/java -cp
 /etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver -u -o MyTest.fo
 MyTest.xml /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
 fop1.extensions=1 callouts.extension=1 use.extensions=1
 /usr/bin/fop -fo MyTest.fo -pdf MyTest.pdf

 As you can see the last callout is missing. For PDF the output is
 missing the complete list of callouts.

 Thanks for suggestions,
 --
 Mathieu




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: Using screenco ?

2010-06-03 Thread Mathieu Malaterre
Just for reference one has to change:

...
 2/13/94   6:21   9,349  WINA20.386/screen
calloutlist
...

into

...
 2/13/94   6:21   9,349  WINA20.386
/screen
calloutlist
...

HTH

On Thu, Jun 3, 2010 at 5:10 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 I finally could get most callouts to work in PDF using comment from:

 http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg14075.html

 but still the very last callout remains invisible in both HTML and PDF 
 output...

 On Thu, Jun 3, 2010 at 4:57 PM, Mathieu Malaterre
 mathieu.malate...@gmail.com wrote:
 Hi there,

  Is anyone using screenco on a typical debian installation ? I am
 attaching the input docbook I am using. I cannot get neither the PDF
 output to work, nor the HTML output.

 Compilation for HTML is:

 /usr/lib/jvm/default-java/bin/java -cp
 /etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver -u MyTest.xml
 /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl
 callouts.extension=1 use.extensions=1 keep.relative.image.uris=1

 Compilation for PDF is:

 /usr/lib/jvm/default-java/bin/java -cp
 /etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver -u -o MyTest.fo
 MyTest.xml /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
 fop1.extensions=1 callouts.extension=1 use.extensions=1
 /usr/bin/fop -fo MyTest.fo -pdf MyTest.pdf

 As you can see the last callout is missing. For PDF the output is
 missing the complete list of callouts.

 Thanks for suggestions,
 --
 Mathieu




 --
 Mathieu




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Re: Using screenco ?

2010-06-03 Thread Mathieu Malaterre
I was not sure this was a bug, since output looks ok. Anyway I added
all the information to this bug report:

https://sourceforge.net/tracker/index.php?func=detailaid=3011108group_id=21935atid=373747

Thanks

On Thu, Jun 3, 2010 at 6:14 PM, Bob Stayton b...@sagehill.net wrote:
 Hi,
 I infer that this change fixed the problem of the last callout not
 appearing.  From that I would also infer that the Java extension code that
 places the callouts based on the areaspec is counting line ending characters
 to place a callout.  That works for all lines except the last if it has no
 line ending.  Since a line ending is not required in the last line of a
 screenco, I would classify that as a bug in the Java code.  Would you mind
 filing a bug report on the DocBook SourceForge site about this?

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Thursday, June 03, 2010 8:37 AM
 Subject: [docbook-apps] Re: Using screenco ?


 Just for reference one has to change:

 ...
 2/13/94   6:21           9,349  WINA20.386/screen
 calloutlist
 ...

 into

 ...
 2/13/94   6:21           9,349  WINA20.386
 /screen
 calloutlist
 ...

 HTH

 On Thu, Jun 3, 2010 at 5:10 PM, Mathieu Malaterre
 mathieu.malate...@gmail.com wrote:

 I finally could get most callouts to work in PDF using comment from:


 http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg14075.html

 but still the very last callout remains invisible in both HTML and PDF
 output...

 On Thu, Jun 3, 2010 at 4:57 PM, Mathieu Malaterre
 mathieu.malate...@gmail.com wrote:

 Hi there,

 Is anyone using screenco on a typical debian installation ? I am
 attaching the input docbook I am using. I cannot get neither the PDF
 output to work, nor the HTML output.

 Compilation for HTML is:

 /usr/lib/jvm/default-java/bin/java -cp

 /etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver -u MyTest.xml
 /usr/share/xml/docbook/stylesheet/docbook-xsl/html/chunkfast.xsl
 callouts.extension=1 use.extensions=1 keep.relative.image.uris=1

 Compilation for PDF is:

 /usr/lib/jvm/default-java/bin/java -cp

 /etc/xml/resolver:/usr/share/java/xslthl.jar:/usr/share/java/xml-commons-resolver-1.1.jar:/usr/share/java/docbook-xsl-saxon.jar:/usr/share/java/saxon.jar
 com.icl.saxon.StyleSheet -x
 org.apache.xml.resolver.tools.ResolvingXMLReader -y
 org.apache.xml.resolver.tools.ResolvingXMLReader -r
 org.apache.xml.resolver.tools.CatalogResolver -u -o MyTest.fo
 MyTest.xml /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
 fop1.extensions=1 callouts.extension=1 use.extensions=1
 /usr/bin/fop -fo MyTest.fo -pdf MyTest.pdf

 As you can see the last callout is missing. For PDF the output is
 missing the complete list of callouts.

 Thanks for suggestions,
 --
 Mathieu




 --
 Mathieu




 --
 Mathieu

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org







-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Minimal example on adding custom XSL script

2010-06-08 Thread Mathieu Malaterre
Hi there,

  I would like to know if there are any minimal example that show how
to create a table in docbook, so that -say- the last line of the table
is the sum of the each row/entry element ?

Thanks,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps]PDF downconversion to docBook XML

2010-06-14 Thread Mathieu Malaterre
Hi Kurt,

  From my very limited experience I found that kword did a pretty good
job at importing PDF. I used also OpenOffice to write out -poor-
docbook.
  You should be able to import your PDF file directly in KWord and
write out (X)HTML file. Watch out that all your formatting will be
lost (no more title, section...).

  I used the following script to convert HTML to docbook:

http://wiki.docbook.org/topic/Html2DocBook

  But in my case, my input HTML was -somewhat- organized.

Good luck

On Fri, Jun 11, 2010 at 11:31 PM, Kurt A Richardson
k...@iscepublishing.com wrote:
 Hi list

 I am new to DocBook, and XML-based publishing in general.   I run a small
 publishing company (30 titles), that specializes in complexity theory and I
 have been looking for ways to not only improve my little doc flow
 methodology, but also make our content available to our readers in a variety
 of new modes and formats.  I have been drawn to DocBook and the possibility
 of using XSLT as a means to realize these goals.  I have little trouble
 figuring out how to prepare new content and am hoping to produce our next
 two titles purely from DocBook XML.  However, I also have about 6000 pages
 of PDFs (not all having the same format) that I'd like to 'down convert' to
 DocBook XML.  I am making SLOW progress and wondered if anyone here had any
 bright ideas about how to approach this task... e.g., is PDF to html the
 best first step?  Or does anyone know of any affordable services being
 provided to do the down conversion for me.

 Many thanks in advance for any guidance you can provide.

 I'm really rather excited about the possibilities that arise once I move our
 publishing from Adobe CS to XML-based!

 Kind regards, Kurt



 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org





-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps]PDF downconversion to docBook XML

2010-06-14 Thread Mathieu Malaterre
One last thing, you can extract your presentation as SVG using PDG2SVG:

http://www.cityinthesky.co.uk/pdf2svg.html

HTH

On Mon, Jun 14, 2010 at 10:41 AM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi Kurt,

  From my very limited experience I found that kword did a pretty good
 job at importing PDF. I used also OpenOffice to write out -poor-
 docbook.
  You should be able to import your PDF file directly in KWord and
 write out (X)HTML file. Watch out that all your formatting will be
 lost (no more title, section...).

  I used the following script to convert HTML to docbook:

 http://wiki.docbook.org/topic/Html2DocBook

  But in my case, my input HTML was -somewhat- organized.

 Good luck

 On Fri, Jun 11, 2010 at 11:31 PM, Kurt A Richardson
 k...@iscepublishing.com wrote:
 Hi list

 I am new to DocBook, and XML-based publishing in general.   I run a small
 publishing company (30 titles), that specializes in complexity theory and I
 have been looking for ways to not only improve my little doc flow
 methodology, but also make our content available to our readers in a variety
 of new modes and formats.  I have been drawn to DocBook and the possibility
 of using XSLT as a means to realize these goals.  I have little trouble
 figuring out how to prepare new content and am hoping to produce our next
 two titles purely from DocBook XML.  However, I also have about 6000 pages
 of PDFs (not all having the same format) that I'd like to 'down convert' to
 DocBook XML.  I am making SLOW progress and wondered if anyone here had any
 bright ideas about how to approach this task... e.g., is PDF to html the
 best first step?  Or does anyone know of any affordable services being
 provided to do the down conversion for me.

 Many thanks in advance for any guidance you can provide.

 I'm really rather excited about the possibilities that arise once I move our
 publishing from Adobe CS to XML-based!

 Kind regards, Kurt



 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org





 --
 Mathieu




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] fop: anchors generating spaces

2010-06-16 Thread Mathieu Malaterre
Hi,

  Did anyone notice that anchor/ generate spaces depending on what
they are next to, eg.:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
  section
title/
paraanchor id=a1/
emphasis role=boldDefinition:/emphasis This is def #1/para
para
anchor id=a2/emphasis role=boldDefinition:/emphasis This
is def #2/para
  /section
/article

Using fop it generates the attached pdf file.

Comments on whether this is expected, or is this something I should
report to fop team ?

Thanks,
-- 
Mathieu


demo_anchor.pdf
Description: Adobe PDF document
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

[docbook-apps] Fwd: fop: leading whitespace in a fo:block

2010-06-23 Thread Mathieu Malaterre
For anyone interested in the anchor/ as empty element in fop, here
is the long story:


-- Forwarded message --
From: Pascal Sancho 
Date: Tue, Jun 22, 2010 at 2:06 PM
Subject: Re: fop: leading whitespace in a fo:block
To: fop-us...@xmlgraphics.apache.org


Hi,

This is related to empty inline with ID (see bug [1]).
your XS-FO can be shrinked to this and shows always the issue:
fo:blockfo:inline id=a1/ Definition: This is def #1/fo:block

(note the space immediately after the inline with ID).

When removing the space (xml-space: ( lf | space | cr | tab ) ) between
inline and text-node then the problem disappears.

[1]: https://issues.apache.org/bugzilla/show_bug.cgi?id=49186

Pascal


Le 22/06/2010 12:48, Mathieu Malaterre a écrit :
 Hi Jeremias,

   Sorry I thought this was easy to reproduce. I am attaching both the
 original docbook demo file and the fo as generated by the current
 docbook xsl:

 $ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
 /tmp/demo.xml  demo.fo

 Thanks again for your help !

 On Tue, Jun 22, 2010 at 8:15 AM, Jeremias Maerki d...@jeremias-maerki.ch 
 wrote:

 Mathieu,
 in a short test I can't reproduce the behaviour you're reporting. Can
 you provide a self-containing boiled-down example (FO file) that
 demonstrates the problem? Whitespace and linefeed treatments depends on
 a whole bunch of properties and their values which cannot be seen in
 your snippet.

 On 19.06.2010 09:50:36 Mathieu Malaterre wrote:

 Hi,

   I am forwarding this issue from the docbook mailing list, if anyone
 would like to comment if this could be a bug in fop or not.

 In the following example, it seems fop does not discard the leading
 whitespace in a fo:block:

 fo:blockfo:inline/[linebreak]
   fo:inlineDefinition 1
 ...


 Is this something known ?

 Thanks,

 -- Forwarded message --
 From: Bob Stayton 
 Date: Fri, Jun 18, 2010 at 6:48 PM
 Subject: Re: [docbook-apps] fop: anchors generating spaces
 To: Mathieu Malaterre , DocBook Apps 


 I think this is an effect of FOP's handling of white spaces.  In both
 of your examples, you introduce white space at the beginning of the
 para.  In the first case, the white space (line feed and indent
 spaces) occurs after the anchor, and in the second case the white
 space (line feed and indent spaces) occurs before the anchor tag.
 In DocBook's FO output, the anchor becomes an empty fo:inline/, and
 emphasis also produces an fo:inline.  So your FO output looks like:

 fo:blockfo:inline/[linebreak]
   fo:inlineDefinition 1
 ...

 fo:block[linebreak]
  fo:inline/fo:inlineDefinition 2
 ...


 I'm not sure what the XSL-FO spec says about this situation, but other
 XSL-FO processors ignore leading whitespace in an fo:block. I'm pretty
 sure HTML browsers do the same in p tags.  It seems FOP does in one
 case but not the other.  in The first case it treats the empty
 fo:inline/ as content that turns on preservation of white space
 after it.  In the second case, all the white space occurs before the
 empty fo:inline.  You might ask the FOP mailing list about it.

 Since para is a mixed content element (which means it can contain
 both text and other elements), white space is considered significant
 in the XML.  The best practice is to avoid leading whitespace in para,
 although that's often hard to do.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Wednesday, June 16, 2010 12:28 AM
 Subject: [docbook-apps] fop: anchors generating spaces



 Hi,

  Did anyone notice that anchor/ generate spaces depending on what
 they are next to, eg.:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
  section
   title/
   paraanchor id=a1/
   emphasis role=boldDefinition:/emphasis This is def #1/para
   para
   anchor id=a2/emphasis role=boldDefinition:/emphasis This
 is def #2/para
  /section
 /article

 Using fop it generates the attached pdf file.

 Comments on whether this is expected, or is this something I should
 report to fop team ?

 Thanks,
 --
 Mathieu



 



 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org




 --
 Mathieu




 Jeremias Maerki


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org








-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional

Re: [docbook-apps] DocBook Spelling Aid

2010-06-27 Thread Mathieu Malaterre
On Sun, Jun 27, 2010 at 12:47 PM, Tom Browder tom.brow...@gmail.com wrote:
 On Sun, Jun 27, 2010 at 05:32, Tom Browder tom.brow...@gmail.com wrote:
 On Sun, Jun 27, 2010 at 04:43, Stefan Kost enso...@hora-obscura.de wrote:
 Am 26.06.2010 15:24, schrieb Tom Browder:
 ...
 You mean like :)
 aspell check --mode=sgml doc.xml

 I get it, I could have used aspell instead of hunspell and specifying
 the English system dictionary,

 Hunspell was the first thing I saw when running apropos on my machine
 to look for a spelling program--didn't think to look further.  I
 forgot about aspell--been a lng time since I used an external
 spell checker

 At any rate, aspell should work with my wrapper with suitable command
 line changes.  It will still help eliminate the cruft and simplify
 spell checking  a large set of files.

Here is my two cents:

  xmllint --postvalid --xinclude --nonet ${input_file} | aspell
list -p path/to/aspell.en.pws --mode=sgml --lang=en --encoding=utf-8

Because this trigger quite a lot of false positive I also append:

foreach( skip in`acronym   application  author  code
hardware  filename   markup   programlisting
productname   screen  sgmltag`)
   --add-f-sgml-skip=${skip}
endforeach()

HTH
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] ulink.footnotes and itemizedlist

2010-07-06 Thread Mathieu Malaterre
Hi,

  Could someone please tell me what the following is supposed to look
like in PDF, when settings are:

xsl:param name=ulink.show select=1/
xsl:param name=ulink.footnotes select=1/

Here is the full docbook code:

?xml version='1.0' encoding='UTF-8'?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
  titleulink / footnotes/title
  para
ulink url=http://www.example.com/index.html;see note below/ulink
  /para
  itemizedlist
listitem
  para
ulink url=http://www.example.com/index.html;see note below/ulink
  /para
  /listitem
/itemizedlist
  para
ulink url=http://www.example.com/index.html;see note below/ulink
  /para
/article

See attached pdf for result on my machine (using fop 0.95). I find it
very strange the the ulink #2 does not appear in the footnote. Do I
need to activate some kind of option ?

Thanks
-Mathieu


Links.pdf
Description: Adobe PDF document
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

[docbook-apps] Re: ulink.footnotes and itemizedlist

2010-07-06 Thread Mathieu Malaterre
nevermind this is a known issue:

http://rvdb.wordpress.com/2008/03/07/rendering-footnotes-in-tables-and-lists-with-fop/

- https://issues.apache.org/bugzilla/show_bug.cgi?id=37579

Sorry for the noise

On Mon, Jul 5, 2010 at 6:30 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi,

  Could someone please tell me what the following is supposed to look
 like in PDF, when settings are:

 xsl:param name=ulink.show select=1/
 xsl:param name=ulink.footnotes select=1/

 Here is the full docbook code:

 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
  titleulink / footnotes/title
  para
    ulink url=http://www.example.com/index.html;see note below/ulink
  /para
  itemizedlist
    listitem
      para
    ulink url=http://www.example.com/index.html;see note below/ulink
      /para
      /listitem
    /itemizedlist
  para
    ulink url=http://www.example.com/index.html;see note below/ulink
  /para
 /article

 See attached pdf for result on my machine (using fop 0.95). I find it
 very strange the the ulink #2 does not appear in the footnote. Do I
 need to activate some kind of option ?

 Thanks
 -Mathieu




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] xml:space=preserve in programlisting, literallayout and screen

2010-07-07 Thread Mathieu Malaterre
Hi there,

  I am wondering if setting the xml:space to preserve is required in
docbook 4.5. Shouldn't this value be automatically set by the DTD ?
  The documentation is a little bit confusing as this info is under
Future Change:

http://www.docbook.org/tdg/en/html/screen.html

Thanks for info !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Generating targetset

2010-07-08 Thread Mathieu Malaterre
Hi there,

  I am wondering if anyone had to deal with this issue before. My
build system is generating a list of filenames to be installed like
that:

files
  file name=share/doc/Common1/Doc1/index.html/
  file name=share/doc/Common1/Doc2/index.html/
  file name=share/doc/Common2/Doc1/index.html/
  file name=share/doc/Common3/Doc1/index.html/
  file name=share/doc/Common3/Doc2/index.html/
/files

  I would need to convert that input XML into the targetset structure,
where common directory need to contains multiple files, so I cannot
simply process one string at a time, but would need some kind of hash
table to find out redundancies.

Any pointer would be greatly appreciated !

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating targetset

2010-07-08 Thread Mathieu Malaterre
On Thu, Jul 8, 2010 at 4:59 PM, Dave Pawson da...@dpawson.co.uk wrote:
 On Thu, 8 Jul 2010 11:21:41 +0200
 Mathieu Malaterre mathieu.malate...@gmail.com wrote:

 Hi there,

   I am wondering if anyone had to deal with this issue before. My
 build system is generating a list of filenames to be installed like
 that:

 files
   file name=share/doc/Common1/Doc1/index.html/
   file name=share/doc/Common1/Doc2/index.html/
   file name=share/doc/Common2/Doc1/index.html/
   file name=share/doc/Common3/Doc1/index.html/
   file name=share/doc/Common3/Doc2/index.html/
 /files

   I would need to convert that input XML into the targetset structure,


 As I said, nothing to do with docbook, why are you asking here?
 Aren't the xsl-list answers enough for you?

For the *exact* same reason there is a xmldepend.xsl as shipped in docbook:

http://docbook.svn.sourceforge.net/viewvc/docbook/trunk/contrib/xsl/xmldepend/

I believe there should be targetset_gen.xsl for ease of integration
of docbook with your build system.

This should have never been a question in XSL mailing list. BTW
docbook 4.5 only requires XSL 1.0, one cannot make it a requirement to
use XSL 2.0 just to be able to generate targetset/olinks files.

2cts
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Generating targetset

2010-07-08 Thread Mathieu Malaterre
On Thu, Jul 8, 2010 at 6:18 PM, Dave Pawson da...@dpawson.co.uk wrote:
 On Thu, 8 Jul 2010 17:41:41 +0200
 Mathieu Malaterre mathieu.malate...@gmail.com wrote:

  As I said, nothing to do with docbook, why are you asking here?
  Aren't the xsl-list answers enough for you?

 For the *exact* same reason there is a xmldepend.xsl as shipped in
 docbook:

 http://docbook.svn.sourceforge.net/viewvc/docbook/trunk/contrib/xsl/xmldepend/

 I believe there should be targetset_gen.xsl for ease of integration
 of docbook with your build system.


 WTF has this to do with docbook?

 RTFM? Your xml needs XSLT transformation into docbook.
 Then ask here?

Dave,

  I really respect your work, esp. your fantastic FAQ for XSL. But I
believe you are getting a little irrespectful, being rude will not
help here.
  My goal was to fill in a gap in the docbook package, with regards to
passing dependencies from a build system into XML (the opposite of
xmldepend.xsl).

-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Generating targetset structure for olinks processing

2010-07-09 Thread Mathieu Malaterre
Hi there,

  Just to close this thread. Here is my final comment. I followed the
guidelines from:

http://www.docbook.org/guidelines

  My understanding is that docbook-apps is the mailing list
appropriate for contribution outside of the docbook language itself
but directly related to application manipulating docbook.

  Having said that, I am attaching an xsl script which generate
targetset structure (I believe this is the correct name) for further
olink processing. I am not attaching copyright or license since the
script is based largely on a post from the xsl-list.

  The requirements for this script is that your build system (CMake in
my case) generates a list of file to be installed (see demo.xml)

files
  file
pathshare/doc/Corporate/Training/BuildQtApplicationsWithCMake.pdf/path
  /file
  file

pathshare/doc/Corporate/Training/BuildQtApplicationsWithCMake/index.html/path
  /file
...

  I simply copy the list of string from the 'make install' rules and
then decorate them with preceding file and trailing /file. This
step is build system dependant (I did it using simple cmake-string
manipulation).

  Once you have this input file. Just process it with
convert_flat_tree_to_targetset_tree.xsl

$ xsltproc convert_flat_tree_to_targetset_tree.xsl demo.xml

This will produce a general olinkdb.xml file:

?xml version=1.0 encoding=UTF-8?
!--
  THIS IS A GENERATED FILE DO NOT EDIT
--
targetset
  targetsetinfo
Description of this target database document,
which is for the examples in olink doc.
  /targetsetinfo
  sitemap
dir name=share
  dir name=doc
dir name=Corporate
  dir name=Training
document targetdoc=BuildQtApplicationsWithCMake
baseuri=BuildQtApplicationsWithCMake.pdf
  xi:include xmlns:xi=http://www.w3.org/2001/XInclude;
href=BuildQtApplicationsWithCMake.olinkdb.xml/
/document
dir name=BuildQtApplicationsWithCMake
  document targetdoc=BuildQtApplicationsWithCMake
baseuri=index.html
xi:include xmlns:xi=http://www.w3.org/2001/XInclude;
href=BuildQtApplicationsWithCMake.olinkdb.xml/
  /document
/dir
...

If you are still reading at that point, you should have notice that
this layout imply that both the global olinkdb.xml and the individual
*.olinkdb.xml (as generated by collect.xref.targets  only) should be
located in the same directory, which means you have to specify an
appropriate targets.filename.

With this script you do not have to manually maintain neither the list
of installed document, nor the path where they are located, and you
leave that to the appropriate tool: your build system.

I am not an XSL expert, so I cannot comment on the style of this
script (portability, robustness...). I made the decision to go away
from DTD and prefer XInclude, so you may have to adapt the xsl script
if you cannot do XInclude.

Thanks for your attention,
-Mathieu
Ps: This script fails when the list of filename is not alphabetically
ordered, I used an intermedicate xsl:sort operation in my case, but
could be done at cmake level.

On Thu, Jul 8, 2010 at 7:29 PM, Bob Stayton b...@sagehill.net wrote:
 Hi Mathieu,
 If this is about olinking, then it is relevant to this list.  I didn't get
 that from the original mail since it didn't mention olink, but targetset
 should have been a sufficient clue.

 I've thought about creating some kind of stylesheet to generate an olink
 targetset structure, but I've never been able to figure out what it should
 do, since everyone's requirements would be different.

 In your case, your XML example shows the output structure, but generating a
 targetset structure requires knowledge of the targetdoc values and the
 locations of the target data files (target.db) to be integrated into the
 targetset structure.  Is that information in this XML example?

 I'm also not clear about what you meant when you said:

 where common directory need to contains multiple files, so I cannot
 simply process one string at a time, but would need some kind of hash
 table to find out redundancies.

 Can you provide a bit more detail?

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: Dave Pawson da...@dpawson.co.uk
 Cc: docbook-apps@lists.oasis-open.org
 Sent: Thursday, July 08, 2010 8:41 AM
 Subject: Re: [docbook-apps] Generating targetset


 On Thu, Jul 8, 2010 at 4:59 PM, Dave Pawson da...@dpawson.co.uk wrote:

 On Thu, 8 Jul 2010 11:21:41 +0200
 Mathieu Malaterre mathieu.malate...@gmail.com wrote:

 Hi there,

 I am wondering if anyone had to deal with this issue before. My
 build system is generating a list of filenames to be installed like
 that:

 files
 file name=share/doc/Common1/Doc1/index.html/
 file name=share/doc/Common1/Doc2/index.html/
 file name=share/doc/Common2/Doc1/index.html/
 file name=share/doc/Common3/Doc1/index.html/
 file name=share/doc/Common3/Doc2

[docbook-apps] PDF olinking and FOP

2010-07-12 Thread Mathieu Malaterre
Hi,

  I am wondering if anyone has a complete setup of docbook + pdf +
olinking working. After some research pdf olinking is documented as
not working with fop:

http://www.sagehill.net/docbookxsl/OlinkPrintOutput.html

  I believe this is incorrect. I could get it working by patching
directly the output fo file to use the following syntax:

  fo:basic-link external-destination=url(my.pdf#dest=myid)

to get the page syntax working:

  fo:basic-link external-destination=url(my.pdf#page=7)

The corresponding my.fo should contains fox:destination named destinations (*):

fox:destination internal-destination=myid/

I found out that the old fop.xsl was exporting fox:destination
elements, but not the new fop1.xsl...

Could someone please shed some light on the actual support of named
destinations in PDF using fop + docbook 1.75 ?

Thanks !
-- 
Mathieu
(*) http://xmlgraphics.apache.org/fop/0.95/extensions.html#named-destinations

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] PDF olinking and FOP

2010-07-13 Thread Mathieu Malaterre
Hi Bob,

  Thanks for your interest !
  You actually need two patches:
1. Fix the url mangling
2. Fix the declaration of named destinations

I could patch the first one with a very ugly patch:

diff -ru /tmp/docbook-xsl-1.75.2+dfsg/fo/xref.xsl
/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/xref.xsl
--- /tmp/docbook-xsl-1.75.2+dfsg/fo/xref.xsl2009-06-08 07:09:03.0 
+0200
+++ /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/xref.xsl   2010-07-13
17:47:53.0 +0200
@@ -1199,6 +1199,16 @@
 /xsl:when
 xsl:when test=$href != ''
   xsl:choose
+xsl:when test=$fop1.extensions != 0
+  xsl:variable name=mybeg select=substring-before($href,'#')/
+  xsl:variable name=myend select=substring-after($href,'#')/
+  fo:basic-link
external-destination=url({concat($mybeg,'#dest=',$myend)})
+ xsl:use-attribute-sets=olink.properties
+xsl:copy-of select=$hottext/
+  /fo:basic-link
+  xsl:copy-of select=$olink.page.citation/
+  xsl:copy-of select=$olink.docname.citation/
+/xsl:when
 xsl:when test=$xep.extensions != 0
   fo:basic-link external-destination=url({$href})
  xsl:use-attribute-sets=olink.properties

Clearly a filename could contains a # so the patch may not work in all
cases, but I did not feel comfortable patching the make.olink.href
function...

The second one is trickier, as it involve generating each
fox:destination right after the fo:bookmark-tree

diff -ru /tmp/docbook-xsl-1.75.2+dfsg/fo/docbook.xsl
/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
--- /tmp/docbook-xsl-1.75.2+dfsg/fo/docbook.xsl 2009-04-23
04:00:30.0 +0200
+++ /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
2010-07-13
18:20:56.0 +0200
@@ -283,6 +283,20 @@
   xsl:copy-of select=$bookmarks/
 /fo:bookmark-tree
   /xsl:if
!-- insert fox:destination --

  I do not know how to iterate over
$bookmarks/fo:bookma...@internal-destination]
  So I am stuck right now. Any advice, would be greatly appreciated !

Thanks,

On Tue, Jul 13, 2010 at 6:32 PM, Bob Stayton b...@sagehill.net wrote:
 Hi,
 When FOP was updated to 0.95, the old fox:outline extension element (and its
 descendant elements) for bookmarks was replaced with the XSL-FO 1.1 standard
 fo:bookmark element and its children.  The old fox:outline contained the
 fox:destination elements, but they are not needed in the new bookmarks so
 they were not retained.

 However, if they are needed for olink destinations, then they should be
 restored.  I'm not sure where to do that, though.  In the old fop.xsl, they
 were all contained in the fox:outline structure, and were not placed on the
 destination fo:blocks.  I guess the id on the destination block was
 sufficient for connecting a reference through the fox:destination element.
  Putting them all in the fox:outline was easy, as it could all be done in
 one place.

 Can fox:destination be put into the fo:bookmark structure without generating
 errors? If not, can a fox:outline structure still be added along side the
 fo:bookmark structure and not produce errors?  Or does each fox:destination
 have to be placed on the destination block itself?  If the latter, then that
 requires making changes in many places in the stylesheet for all the
 elements that might need them.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Monday, July 12, 2010 8:31 AM
 Subject: [docbook-apps] PDF olinking and FOP


 Hi,

  I am wondering if anyone has a complete setup of docbook + pdf +
 olinking working. After some research pdf olinking is documented as
 not working with fop:

 http://www.sagehill.net/docbookxsl/OlinkPrintOutput.html

  I believe this is incorrect. I could get it working by patching
 directly the output fo file to use the following syntax:

  fo:basic-link external-destination=url(my.pdf#dest=myid)

 to get the page syntax working:

  fo:basic-link external-destination=url(my.pdf#page=7)

 The corresponding my.fo should contains fox:destination named destinations
 (*):

 fox:destination internal-destination=myid/

 I found out that the old fop.xsl was exporting fox:destination
 elements, but not the new fop1.xsl...

 Could someone please shed some light on the actual support of named
 destinations in PDF using fop + docbook 1.75 ?

 Thanks !
 --
 Mathieu
 (*)
 http://xmlgraphics.apache.org/fop/0.95/extensions.html#named-destinations

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org








-- 
Mathieu

Re: [docbook-apps] PDF olinking and FOP (Patch included)

2010-07-15 Thread Mathieu Malaterre
Hi there,

  In order to log this discussion, I opened a bug report with the
current patch I am using on my system. See

http://sourceforge.net/tracker/?func=detailaid=3029845group_id=21935atid=373747

  I am open to suggestion

Thanks !

On Tue, Jul 13, 2010 at 11:58 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi Bob,

  Thanks for your interest !
  You actually need two patches:
 1. Fix the url mangling
 2. Fix the declaration of named destinations

 I could patch the first one with a very ugly patch:

 diff -ru /tmp/docbook-xsl-1.75.2+dfsg/fo/xref.xsl
 /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/xref.xsl
 --- /tmp/docbook-xsl-1.75.2+dfsg/fo/xref.xsl    2009-06-08 07:09:03.0 
 +0200
 +++ /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/xref.xsl   2010-07-13
 17:47:53.0 +0200
 @@ -1199,6 +1199,16 @@
         /xsl:when
         xsl:when test=$href != ''
           xsl:choose
 +            xsl:when test=$fop1.extensions != 0
 +              xsl:variable name=mybeg 
 select=substring-before($href,'#')/
 +              xsl:variable name=myend 
 select=substring-after($href,'#')/
 +              fo:basic-link
 external-destination=url({concat($mybeg,'#dest=',$myend)})
 +                             xsl:use-attribute-sets=olink.properties
 +                xsl:copy-of select=$hottext/
 +              /fo:basic-link
 +              xsl:copy-of select=$olink.page.citation/
 +              xsl:copy-of select=$olink.docname.citation/
 +            /xsl:when
             xsl:when test=$xep.extensions != 0
               fo:basic-link external-destination=url({$href})
                              xsl:use-attribute-sets=olink.properties

 Clearly a filename could contains a # so the patch may not work in all
 cases, but I did not feel comfortable patching the make.olink.href
 function...

 The second one is trickier, as it involve generating each
 fox:destination right after the fo:bookmark-tree

 diff -ru /tmp/docbook-xsl-1.75.2+dfsg/fo/docbook.xsl
 /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl
 --- /tmp/docbook-xsl-1.75.2+dfsg/fo/docbook.xsl 2009-04-23
 04:00:30.0 +0200
 +++ /usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl        
 2010-07-13
 18:20:56.0 +0200
 @@ -283,6 +283,20 @@
           xsl:copy-of select=$bookmarks/
         /fo:bookmark-tree
       /xsl:if
 !-- insert fox:destination --

  I do not know how to iterate over
 $bookmarks/fo:bookma...@internal-destination]
  So I am stuck right now. Any advice, would be greatly appreciated !

 Thanks,

 On Tue, Jul 13, 2010 at 6:32 PM, Bob Stayton b...@sagehill.net wrote:
 Hi,
 When FOP was updated to 0.95, the old fox:outline extension element (and its
 descendant elements) for bookmarks was replaced with the XSL-FO 1.1 standard
 fo:bookmark element and its children.  The old fox:outline contained the
 fox:destination elements, but they are not needed in the new bookmarks so
 they were not retained.

 However, if they are needed for olink destinations, then they should be
 restored.  I'm not sure where to do that, though.  In the old fop.xsl, they
 were all contained in the fox:outline structure, and were not placed on the
 destination fo:blocks.  I guess the id on the destination block was
 sufficient for connecting a reference through the fox:destination element.
  Putting them all in the fox:outline was easy, as it could all be done in
 one place.

 Can fox:destination be put into the fo:bookmark structure without generating
 errors? If not, can a fox:outline structure still be added along side the
 fo:bookmark structure and not produce errors?  Or does each fox:destination
 have to be placed on the destination block itself?  If the latter, then that
 requires making changes in many places in the stylesheet for all the
 elements that might need them.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Monday, July 12, 2010 8:31 AM
 Subject: [docbook-apps] PDF olinking and FOP


 Hi,

  I am wondering if anyone has a complete setup of docbook + pdf +
 olinking working. After some research pdf olinking is documented as
 not working with fop:

 http://www.sagehill.net/docbookxsl/OlinkPrintOutput.html

  I believe this is incorrect. I could get it working by patching
 directly the output fo file to use the following syntax:

  fo:basic-link external-destination=url(my.pdf#dest=myid)

 to get the page syntax working:

  fo:basic-link external-destination=url(my.pdf#page=7)

 The corresponding my.fo should contains fox:destination named destinations
 (*):

 fox:destination internal-destination=myid/

 I found out that the old fop.xsl was exporting fox:destination
 elements, but not the new fop1.xsl...

 Could someone please shed some light on the actual support of named
 destinations in PDF using fop + docbook 1.75 ?

 Thanks !
 --
 Mathieu

[docbook-apps] tablecolumns.extension

2010-07-16 Thread Mathieu Malaterre
Hi ,

  I discover today that I cannot use libxml2 anymore because
tablecolumns.extension is not supported for this XSL engine.

  I am reading the documentation for the option at:

http://docbook.sourceforge.net/release/xsl/current/doc/fo/tablecolumns.extension.html

  I do not really understand what this refer to ? Does anyone knows
what this extension is supposed to do (it is on by default).

Thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] dbfo / example

2010-07-23 Thread Mathieu Malaterre
Hi there,

  I am looking at the documentation of example at:

http://www.docbook.org/tdg/en/html/example.html

  I cannot tell from this page, that this particular docbook element
supports the ?dbfo pgwide=1? processing instruction.

  Am I reading this page incorrectly ? Where is the list of processing
instructions supported for a particular docbook element ?

Thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] informalexample?dbfo pgwide=1? + area coords

2010-07-29 Thread Mathieu Malaterre
Hi there,

  I am wondering if dbfo and area coords are supposed to work well
together. If I use it in a simple example, the position of the callout
bullet does not seems to as far to the right as possible.

  Is this something people have done in the past ? Should I just use
full coords (with column number) ?

Thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] db4-upgrade.xsl: book/bookinfo/abstract not preserved

2010-09-12 Thread Mathieu Malaterre
Ok, I filed a bug report:

https://sourceforge.net/tracker/?func=detailaid=3064674group_id=21935atid=373747

thx

On Sat, Sep 11, 2010 at 8:55 PM, Bob Stayton b...@sagehill.net wrote:
 Yes, this looks like a bug.  There is a template for abstract, but it isn't
 working when the abstract is inside bookinfo.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Saturday, September 11, 2010 7:58 AM
 Subject: [docbook-apps] db4-upgrade.xsl: book/bookinfo/abstract not
 preserved


 Hi there,

  did anyone noticed that book/bookinfo/abstract was lost during a
 db4-upgrade.xsl process ?

 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE book PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 book
   title/title
  bookinfo
   title/title
   abstract
     parakeep me/para
   /abstract
  /bookinfo
 /book

 becomes:

 !-- Converted by db4-upgrade version 1.0 --

 book xmlns=http://docbook.org/ns/docbook; version=5.0

  infotitle/


  /info
 /book

 should I fill a bug report ?

 thanks,
 --
 Mathieu

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org









-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Add support for named destination in PDF/FOP (ID: 3029845)

2010-09-12 Thread Mathieu Malaterre
dear docbook developers,

  I would really appreciate if someone could review my propose changes
to re-activate support for named destination in fop.
  The patch is attached to:

http://sourceforge.net/tracker/?func=detailatid=373747aid=3029845group_id=21935

  I am open to suggestion and/or improvements

thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Best practice for multilanguage Docbook?

2011-03-10 Thread Mathieu Malaterre
Hi,

  I am looking for help/suggestion on the following issue: what is the
best practice for writing a multilanguage docbook document ?
  docbook support the lang attribute in all elements, so I could use
the profile mechanism to select generation of a target language based
on that (*).
  However looking at the implementation in publican (**), they have
preferred the 'pot' mechanism.

Any comments/feedback on that ?
-- 
Mathieu

(*) http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg03098.html
(**) https://fedorahosted.org/publican/

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Best practice for multilanguage Docbook?

2011-03-16 Thread Mathieu Malaterre
Hi Bob,

  now that you have explained it, I now understand my own question ! Thanks.

  I will be writing both documentation (English  French) in a single
document (or xinclude), which is not the scenario which publican was
designed for. I'll use profiling.

Thanks.

On Mon, Mar 14, 2011 at 10:01 PM, Bob Stayton b...@sagehill.net wrote:
 Hi Mathieu,
 I don't think there is a single best practice because different people have
 different requirements.  If it is a single document and you are handling the
 translation, then a single multi-language source document and profiling
 would be fine.  If you have lots of documents and/or many languages, a
 different approach might be more efficient. Further description of your
 requirements might generate a more detailed response from the list.

 One question is whether the document will need to be maintained, that is,
 updated with new information periodically. Each update will require
 retranslation, and the goal of the management system should be to minimize
 the cost of translation by minimizing the number of words to be
 retranslated.

 I've seen systems that break up the original language source document into
 modular sections, which are kept under source control. Modules are submitted
 to the translation service(s) as needed, based on a comparison of timestamps
 of the source and translated files. Someone should review the modules before
 submission to ensure real content changed, not just punctuation or product
 names that could be updated by you.   Also, most translation services
 maintain translation memories, which means only changed content within a
 module will have to be retranslated, not the whole module.  I don't think
 translation memories would work with a mixed language source document.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Thursday, March 10, 2011 3:31 AM
 Subject: [docbook-apps] Best practice for multilanguage Docbook?


 Hi,

  I am looking for help/suggestion on the following issue: what is the
 best practice for writing a multilanguage docbook document ?
  docbook support the lang attribute in all elements, so I could use
 the profile mechanism to select generation of a target language based
 on that (*).
  However looking at the implementation in publican (**), they have
 preferred the 'pot' mechanism.

 Any comments/feedback on that ?
 --
 Mathieu

 (*)
 http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg03098.html
 (**) https://fedorahosted.org/publican/

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org








-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Problem with tables and roundtrip to WordML

2011-03-21 Thread Mathieu Malaterre
Hi Steve,

On Mon, Mar 21, 2011 at 10:19 AM, Steve Ball steve.b...@explain.com.au wrote:
 Patches certainly are welcome. I'm doing some work on the roundtrip system 
 right now, so I can get those modifications into the official release fairly 
 soon.

Are you working on these ones ?

http://sourceforge.net/tracker/?func=detailaid=3197293group_id=21935atid=373747

and

http://sourceforge.net/tracker/?func=detailaid=3231485group_id=21935atid=373747

They have no patch, but let me know if you need more info.

Thanks
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] profile.lang and docbook slides

2011-04-06 Thread Mathieu Malaterre
Hi all,

  I am trying to select a profile based on long on a slides document
(v3.4.0). Reading the documentation at:

http://docbook.sourceforge.net/release/xsl/current/doc/fo/profile.lang.html

  It seems the I need a specific profiles for each type of document. I
could not find no profile.xsl in the docbook-slides distribution. Has
anyone done any profiling on docbook-slides ?

Thanks a bunch
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Request for subtitle of unexpected element: slides

2011-06-20 Thread Mathieu Malaterre
Dear all,

  I am getting this funny warning message:

Request for subtitle of unexpected element: slides

  When generating a docbook-slides (3.4.0 release). It seems to be
coming from the following:

xsl:template match=* mode=subtitle.markup
  xsl:message
xsl:textRequest for subtitle of unexpected element: /xsl:text
xsl:value-of select=local-name(.)/
  /xsl:message
  xsl:text???SUBTITLE???/xsl:text
/xsl:template

  However I do not understand what I need to change in my docbook
slides to get rid of this warning.

Thanks !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Request for subtitle of unexpected element: slides

2011-06-21 Thread Mathieu Malaterre
Hi Bob,

  Please find attached what I called a slides docbook. Then simply run:

$ xsltproc --stringparam fop1.extensions 1
/usr/share/xml/docbook/custom/slides/3.4.0/xsl/fo/plain.xsl test.xml 
log
Making landscape pages on USletter paper (11inx8.5in)
Request for subtitle of unexpected element: slides

Thanks

On Mon, Jun 20, 2011 at 6:28 PM, Bob Stayton b...@sagehill.net wrote:
 Hi,
 Can you be more specific about which slides stylesheet you are using and how
 you are applying it?  Thanks.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Monday, June 20, 2011 2:12 AM
 Subject: [docbook-apps] Request for subtitle of unexpected element: slides


 Dear all,

  I am getting this funny warning message:

 Request for subtitle of unexpected element: slides

  When generating a docbook-slides (3.4.0 release). It seems to be
 coming from the following:

 xsl:template match=* mode=subtitle.markup
  xsl:message
   xsl:textRequest for subtitle of unexpected element: /xsl:text
   xsl:value-of select=local-name(.)/
  /xsl:message
  xsl:text???SUBTITLE???/xsl:text
 /xsl:template

  However I do not understand what I need to change in my docbook
 slides to get rid of this warning.

 Thanks !
 --
 Mathieu

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org








-- 
Mathieu
?xml version=1.0 encoding=UTF-8?
!DOCTYPE slides PUBLIC -//Norman Walsh//DTD Slides XML V3.4.0//EN file:///usr/share/xml/docbook/custom/slides/3.4.0/schema/dtd/slides.dtd
slides
  slidesinfo
titleSlides title/title
  /slidesinfo
  foil
titleBla/title
parapara/para
  /foil
/slides
-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

[docbook-apps] docbook qandaset

2012-08-03 Thread Mathieu Malaterre
Hi,

  I'd like to prepare some exercise for some presentation I will be
doing. I am looking at qandaset as it seems the most appropriate for
doing question and answer style document. However I'd like to hide the
answer when presenting the question.

I tried a simple approach using hard-break
(http://www.sagehill.net/docbookxsl/PageBreaking.html). But this fails
with:

  Error reported by XML parser: The prefix fo for element fo:block
is not bound.

I cannot add a ?hard-pagebreak? within qandaentry/ element.

So my question is: is there another way of doing this ?
My initial approach was to use foil (from slides), but there is not
such properties as foil.autolabel for numbering of questions.

I am generating PDF output so I cannot use:
https://lists.oasis-open.org/archives/docbook-apps/201201/msg00083.html

Thanks
--
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] docbook qandaset

2012-08-03 Thread Mathieu Malaterre
On Fri, Aug 3, 2012 at 1:08 PM, Thomas Schraitle tom_s...@web.de wrote:
 Hi Mathieu,

 On Fri, 3 Aug 2012 12:20:32 +0200
 Mathieu Malaterre mathieu.malate...@gmail.com wrote:

   I'd like to prepare some exercise for some presentation I will be
 doing. I am looking at qandaset as it seems the most appropriate for
 doing question and answer style document. However I'd like to hide the
 answer when presenting the question.

 I tried a simple approach using hard-break
 (http://www.sagehill.net/docbookxsl/PageBreaking.html). But this fails
 with:

   Error reported by XML parser: The prefix fo for element fo:block
 is not bound.

 You've forgot to add the FO namespace. Check the header of your
 stylesheet:

  xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:fo=http://www.w3.org/1999/XSL/Format;
 version='1.0'


Indeed. That fixed the issue.

 So my question is: is there another way of doing this ?
 My initial approach was to use foil (from slides), but there is not
 such properties as foil.autolabel for numbering of questions.

 I am generating PDF output so I cannot use:
 https://lists.oasis-open.org/archives/docbook-apps/201201/msg00083.html

 The usual approach is to write a customization layer. Here you can find
 how to do it:

 http://doccookbook.sourceforge.net/html/en/dbc.common.dbcustomize.html
 http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer

 Add in your customization layer an empty answer template like this:

  xsl:template match=answer/

 Whenever you process your document with your own customization layer,
 all the answers will be suppressed.

I am not looking for something like:

http://www.sagehill.net/docbookxsl/HideAnswers.html

I want to be able to display the question on the videoproject, leave 5
min to think, then display the answer. I really mean 'hide'
temporarily, not remove.

Thanks,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] WYSIWYG Editor for docbook

2012-08-13 Thread Mathieu Malaterre
I have been using the free version of Serna. It is the only app which
support XInclude AFAIK.

I used then the docboox 4.x - docbook 5 converter since serna only
support docbook 4.x

http://www.syntext.com/products/serna-free/

HTH

On Mon, Aug 13, 2012 at 12:05 AM, Paul Taylor paul_t...@fastmail.fm wrote:
 In a previous project I used docbook 4 to create help text for an
 application which I then used it to generate html and Javahelp. The
 generation worked very well but I found it very difficult writing the help
 text embedded within the docbook tags, it wasn't until the final output was
 generated that I could see my typos and generally bad english.

 So considering using docbook v5 for a new project but is there a WYSIWYG
 editor/plugin available, i.e create help text in word/open office type
 program but am able to save it in docbook format ?

 Paul

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org




-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] docbook-slides: XML Summer School

2012-08-24 Thread Mathieu Malaterre
I am looking for an example of customization for docbook-slides to get
started quickly. I found out from the wiki the following link:

http://nwalsh.com/docs/presentations/2011/xmlss/

The presentation looks darn good, however neither the source (xml) nor
the customisation seems to be available.

Does anyone knows:
- if there are other examples available on the net ?
- if the source/customization can be find somewhere else ?

Thanks much for info (docbook-slide 3.4.0 only please, I am not ready
for the brand new docbook-slides upgrade).

Regards,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Request for subtitle of unexpected element: slides (update)

2012-08-30 Thread Mathieu Malaterre
Ok,

  Here is what I did, I simply hacked my local docbook-slides
installation and added:

$ cat /usr/share/xml/docbook/custom/slides/3.4.0/xsl/fo/plain-titlepage.xsl
[...]
xsl:template match=* mode=subtitle.markup
  xsl:message
xsl:textRequest for subtitle of unexpected element: /xsl:text
xsl:value-of select=local-name(.)/
  /xsl:message
xsl:value-of select=slidesinfo/subtitle[1]/
/xsl:template
[...]

At least I have now:

$ pdfinfo handson.pdf
Title:  Exercises - Training Courses
[...]

instead of the ugly:

$ pdfinfo handson.pdf
Title:  Exercises - ???SUBTITLE???
[...]

2cts

On Tue, Jun 21, 2011 at 6:42 PM, Bob Stayton b...@sagehill.net wrote:
 Hi,
 I think the message is coming from the template named
 fop1-document-information in fo/fop1.xsl.  It has this line:

   xsl:apply-templates select=/*[1] mode=subtitle.markup/

 This template is applied whenever fop1.extensions = 1, as in your case.  It
 is trying to append any subtitle to the title in PDF metadata.  The
 subtitle.markup mode triggers the generated text (gentext) machinery, which
 tries to look up a gentext template in common/en.xml (or whatever the
 document language is) for name=slides in the context=subtitle, and it
 fails.  Unfortunately, it does not fail quietly, as most apply-templates do.

 The other fo extension files (xep.xsl, axf.xsl, etc.) do not try to do this,
 so it is only the fop1 version that does.  Not sure why they are not
 consistent.

 You could either customize the fop1-document-information template to not
 test for subtitle, or you could add a gentext template to your customization
 for name=slides in the subtitle context.  For more information on the
 latter, see:

 http://www.sagehill.net/docbookxsl/CustomGentext.html


 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: Bob Stayton b...@sagehill.net
 Cc: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Tuesday, June 21, 2011 3:11 AM
 Subject: Re: [docbook-apps] Request for subtitle of unexpected element:
 slides



 Hi Bob,

  Please find attached what I called a slides docbook. Then simply run:

 $ xsltproc --stringparam fop1.extensions 1
 /usr/share/xml/docbook/custom/slides/3.4.0/xsl/fo/plain.xsl test.xml 
 log
 Making landscape pages on USletter paper (11inx8.5in)
 Request for subtitle of unexpected element: slides

 Thanks

 On Mon, Jun 20, 2011 at 6:28 PM, Bob Stayton b...@sagehill.net wrote:

 Hi,
 Can you be more specific about which slides stylesheet you are using and
 how
 you are applying it? Thanks.

 Bob Stayton
 Sagehill Enterprises
 b...@sagehill.net


 - Original Message - From: Mathieu Malaterre
 mathieu.malate...@gmail.com
 To: DocBook Apps docbook-apps@lists.oasis-open.org
 Sent: Monday, June 20, 2011 2:12 AM
 Subject: [docbook-apps] Request for subtitle of unexpected element: slides


 Dear all,

 I am getting this funny warning message:

 Request for subtitle of unexpected element: slides

 When generating a docbook-slides (3.4.0 release). It seems to be
 coming from the following:

 xsl:template match=* mode=subtitle.markup
 xsl:message
 xsl:textRequest for subtitle of unexpected element: /xsl:text
 xsl:value-of select=local-name(.)/
 /xsl:message
 xsl:text???SUBTITLE???/xsl:text
 /xsl:template

 However I do not understand what I need to change in my docbook
 slides to get rid of this warning.

 Thanks !
 --
 Mathieu

 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org








 --
 Mathieu



 



 -
 To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
 For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org





-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] font-size for simplelist ?

2012-08-30 Thread Mathieu Malaterre
Hi there,

  Does anyone knows how to change the font size of all element in a
simplelist ? I tried a naive approach:

xsl:attribute-set name=simplelist.properties
  xsl:attribute name=font-size
xsl:choose
  xsl:when test=@role= 'small10pt/xsl:when
  xsl:otherwiseinherit/xsl:otherwise
/xsl:choose
/xsl:attribute
/xsl:attribute-set

with no luck.

I cannot find any references neither on:

http://docbook.sourceforge.net/release/xsl/1.76.1/doc/fo/lists.html

nor on:

http://www.sagehill.net/docbookxsl/SimpleList.html

Thanks !

-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Request for subtitle of unexpected element: slides (update)

2012-08-30 Thread Mathieu Malaterre
On Thu, Aug 30, 2012 at 2:54 PM, Thomas Schraitle tom_s...@web.de wrote:
[...]
 If you use xsl:value-of, you get the complete _string_ of your
 subtitle content---without any quotes. The quotes can only appear if you
 allow your template to process its child elements. Use
 xsl:apply-templates and you will see the quotes.

That is incorrect. I use emphasis/ in my subtitle and it appears
nicely in the PDF metadata header. The emphasis/ element has been
stripped out.

2cts
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] Request for subtitle of unexpected element: slides (update)

2012-08-30 Thread Mathieu Malaterre
On Thu, Aug 30, 2012 at 5:00 PM, Thomas Schraitle tom_s...@web.de wrote:
   xsl:template match=slidesinfo/subtitle[1] mode=subtitle.markup
  xsl:value-of select=./
   /xsl:template

 That should give you (hopefully) the same results.

No, that does not seems to be working at least on my system. The
famous '???SUBTITLE???' is back.
I am keeping my ugly hack for now.

Thanks anyway,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] docbook-slides: footnote in title ?

2012-09-02 Thread Mathieu Malaterre
Hi there,

  Does anyone knows whether the following is valid:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE slides PUBLIC -//Norman Walsh//DTD Slides XML V3.4.0//EN
http://docbook.sourceforge.net/release/slides/3.4.0/schema/dtd/slides-full.dtd;
slides
  foil
  titleMy Titlefootnoteparaulink
url=http://www.example.com///para/footnote/title
  para/
  /foil
/slides

it makes fop crash with a java.lang.NullPointerException exception.

as a side note, the following is working nicely:

?xml version='1.0' encoding='UTF-8'?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
section
  titleMy Titlefootnoteparaulink
url=http://www.example.com///para/footnote/title
  para/
/section
/article

See also:
https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

Thanks for comments,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Re: docbook-slides: footnote in title ?

2012-09-10 Thread Mathieu Malaterre
Apparently this is something that was unexpected by fop:

https://issues.apache.org/bugzilla/show_bug.cgi?id=53817#c3

...
The NPE is thrown when foot-note is declared within the static-before region.
If I move the foot-note to the body, the NPE disappears.

Note that FOP behaves in the same way whatever the version is (tried
against v0.95, v1.0, latest trunk).

That said, IMHO I don't think that a static region is the right place
for a footnote declaration, so author should avoid to use that at this
place, as a good practice/workaround.
...

HTH

On Sun, Sep 2, 2012 at 5:39 PM, Mathieu Malaterre
mathieu.malate...@gmail.com wrote:
 Hi there,

   Does anyone knows whether the following is valid:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE slides PUBLIC -//Norman Walsh//DTD Slides XML V3.4.0//EN
 http://docbook.sourceforge.net/release/slides/3.4.0/schema/dtd/slides-full.dtd;
 slides
   foil
   titleMy Titlefootnoteparaulink
 url=http://www.example.com///para/footnote/title
   para/
   /foil
 /slides

 it makes fop crash with a java.lang.NullPointerException exception.

 as a side note, the following is working nicely:

 ?xml version='1.0' encoding='UTF-8'?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
 section
   titleMy Titlefootnoteparaulink
 url=http://www.example.com///para/footnote/title
   para/
 /section
 /article

 See also:
 https://issues.apache.org/bugzilla/show_bug.cgi?id=53817

 Thanks for comments,
 --
 Mathieu



-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] computeroutput vs screen vs xmllint

2012-09-10 Thread Mathieu Malaterre
Hi all,

  We are internally using different docbook editors (vi, emacs, serna
and xmlmind). To some extent, we would like to preserve a nice and
clear history of revision of our XML files in SVN (subversion). For
this we use a script based on xmllint --format to reformat to a unique
presentation. This has work quite well until today. Could someone
please let me know if the following situation is an issue with either
XML or docbook itself:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
  section
titleIntroduction/title
paraBefore/para
screencomputeroutputa.txt
b.txt
/computeroutput
/screen
paraAfter/para
  /section
/article

while xmllint --format prefers:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
  section
titleIntroduction/title
paraBefore/para
screen
  computeroutputa.txt
b.txt
/computeroutput
/screen
paraAfter/para
  /section
/article

This leads to differences in the fo output with extra spaces. So how
does one handles such corner cases ?

Thanks much !
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] computeroutput vs screen vs xmllint

2012-09-11 Thread Mathieu Malaterre
Stefan,

On Tue, Sep 11, 2012 at 10:01 AM, Stefan Hinz stefan.h...@oracle.com wrote:
We are internally using different docbook editors (vi, emacs, serna
 and xmlmind). To some extent, we would like to preserve a nice and
 clear history of revision of our XML files in SVN (subversion). For
 this we use a script based on xmllint --format to reformat to a unique
 presentation. This has work quite well until today. Could someone
 please let me know if the following situation is an issue with either
 XML or docbook itself:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
section
  titleIntroduction/title
  paraBefore/para
  screencomputeroutputa.txt
 b.txt
 /computeroutput
 /screen
  paraAfter/para
/section
 /article

 while xmllint --format prefers:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
section
  titleIntroduction/title
  paraBefore/para
  screen
computeroutputa.txt
 b.txt
 /computeroutput
  /screen
  paraAfter/para
/section
 /article


 The latter is wrong. Stuff within verbatim containers such as screen or
 programlisting shouldn't be re-formatted at all, but rather preserved as
 is.

 I'd suggest using Paul DuBois' XML Formatter which does what it's supposed
 to do. It's included in many Linux distros already, but if it's not in yours
 (or if you're not using Linux) you can find it here:

 http://www.kitebird.com/software/xmlformat/

$ wget http://www.kitebird.com/software/xmlformat/xmlformat-1.04.tar.gz
$ tar xvfz xmlformat-1.04.tar.gz
$ cd xmlformat-1.04
$ cp xmlformat.pl /usr/local/bin/xmlformat
$ xmlformat input.xml  new.xml
$ cat new.xml
?xml version=1.0 encoding=UTF-8?
!DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
article
 section
  titleIntroduction/title
  paraBefore/para
  screen
   computeroutputa.txt
b.txt
/computeroutput
  /screen
  paraAfter/para
 /section
/article


This is *exactly* what I am trying to avoid. xmllint and xmlformat
seems to produce the exact same output. Is it working as supposed on
your machine ? Which version are you using ?

Thanks again,
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] computeroutput vs screen vs xmllint

2012-09-11 Thread Mathieu Malaterre
On Tue, Sep 11, 2012 at 11:33 AM, Stefan Hinz stefan.h...@oracle.com wrote:
 Bonjour Mathieu,


 On Tue, Sep 11, 2012 at 10:01 AM, Stefan Hinz stefan.h...@oracle.com
 wrote:

 We are internally using different docbook editors (vi, emacs, serna
 and xmlmind). To some extent, we would like to preserve a nice and
 clear history of revision of our XML files in SVN (subversion). For
 this we use a script based on xmllint --format to reformat to a unique
 presentation. This has work quite well until today. Could someone
 please let me know if the following situation is an issue with either
 XML or docbook itself:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
 section
   titleIntroduction/title
   paraBefore/para
   screencomputeroutputa.txt
 b.txt
 /computeroutput
 /screen
   paraAfter/para
 /section
 /article

 while xmllint --format prefers:

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
 section
   titleIntroduction/title
   paraBefore/para
   screen
 computeroutputa.txt
 b.txt
 /computeroutput
   /screen
   paraAfter/para
 /section
 /article



 The latter is wrong. Stuff within verbatim containers such as screen
 or
 programlisting shouldn't be re-formatted at all, but rather preserved
 as
 is.

 I'd suggest using Paul DuBois' XML Formatter which does what it's
 supposed
 to do. It's included in many Linux distros already, but if it's not in
 yours
 (or if you're not using Linux) you can find it here:

 http://www.kitebird.com/software/xmlformat/


 $ wget http://www.kitebird.com/software/xmlformat/xmlformat-1.04.tar.gz
 $ tar xvfz xmlformat-1.04.tar.gz
 $ cd xmlformat-1.04
 $ cp xmlformat.pl /usr/local/bin/xmlformat
 $ xmlformat input.xml  new.xml
 $ cat new.xml
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE article PUBLIC -//OASIS//DTD DocBook XML V4.5//EN
 http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;
 article
   section
titleIntroduction/title
paraBefore/para
screen
 computeroutputa.txt
 b.txt
 /computeroutput
/screen
paraAfter/para
   /section
 /article


 This is *exactly* what I am trying to avoid. xmllint and xmlformat
 seems to produce the exact same output. Is it working as supposed on
 your machine ? Which version are you using ?


 Darn, sorry for that. :-(

 I guess xmlformat-1.04 still doesn't include the setting it includes in our
 setup here:

 atlas~/svn/mysqldoc-toolset/tools grep screen xmlformat.conf
 programlisting literallayout synopsis screen

 In other words, add screen to the respective line of xmlformat.conf, and
 things should work properly.

magnificent !

Thanks a bunch
-- 
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



[docbook-apps] Playing with docbook/roundtrip

2013-06-10 Thread Mathieu Malaterre
Dear all,

  I am trying to play with the docbook/rountrip module. So far here is
what I did:

$ wget 
http://sourceforge.net/projects/docbook/files/docbook-xsl/1.78.1/docbook-xsl-1.78.1.tar.bz2
$ tar xf docbook-xsl-1.78.1.tar.bz2
$ cd docbook-xsl-1.78.1
$ xmllint --noout --relaxng
http://www.docbook.org/xml/5.0/rng/docbook.rng
./roundtrip/specifications.xml
./roundtrip/specifications.xml:6: element firstname: Relax-NG validity
error : Expecting element personname, got firstname
./roundtrip/specifications.xml:6: element firstname: Relax-NG validity
error : Element author failed to validate content
Relax-NG validity error : Extra element author in interleave
./roundtrip/specifications.xml:5: element author: Relax-NG validity
error : Element info failed to validate content
./roundtrip/specifications.xml:3: element info: Relax-NG validity
error : Element article failed to validate content
./roundtrip/specifications.xml fails to validate


  Does anyone knows if roundtrip module is in working state ?

Thanks,

--
Mathieu

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org



Re: [docbook-apps] A little XML-to-XML handholding?

2013-07-28 Thread Mathieu Malaterre
On Sun, Jul 28, 2013 at 3:18 AM, Michael Crawford li...@warplife.com wrote:
 Greetings, Earthlings,

 I have some articles and essays that are all marked up with valid XHTML 1.0
 Strict with CSS, that I would like to publish as bound, dead-tree books,
 possibly also eBooks.

Here is what I have been doing:
1. If you have a clear control over the input (X)HTML. Then you may go
with the so-called html2docbook.xsl script (official page disapear
from docbook site, but you can find copies other places). This way you
have a very fine control over the generated docbook.

2. If you HTML input is more complex. I generally use tidy as cleanup
step, then pass output to herold: http://www.dbdoclet.org/

Solution 2, directly generates docbook 5. While 1 generates 4.x style
(you would need an extra docbook 4.x - 5.0 step, from the official
package).

2cts

-
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org