Re: [docbook-apps] Bibliographic styling

2020-05-23 Thread Peter Fleck
Richard,

Would it be possible to step back a level and work on it in combination
with CSL? https://citationstyles.org/ That way, it would not just be
limited to CMOS. (Although having CMOS would be a major bonus for me.)
The Github repo for the CSL styles are
https://github.com/citation-style-language/styles
There are a few on that list I would find extremely helpful.

Peter

On Sat, 23 May 2020 at 12:43, Norman Tovey-Walsh  wrote:

> Richard Hamilton  writes:
> > I’m thinking of taking on the task of creating a docbook
> > customization, similar to the iso690 customization, to process
> > bibliographic information in the Chicago Manual of Style format.
> >
> > Before I dive in head first, I thought I’d check with the group to see
> > if anyone has already done that.
>
> I wonder if it would be possible to describe the format in some
> declarative way and either derive the stylesheet from that or interpret
> it?
>
> I looked briefly at doing that with BibTeX once, but that seemed a
> little too challenging for the amount of free time that I have (which is
> generally measured in negative numbers).
>
> > To streamline the markup of inline references to bibliographic
> > entries, I wonder whether it would stretch the standard too far to
> > interpret a linkend in a citetitle as pointing to a bibliographic
> > reference and process it as though it were a biblioref immediately
> > following the citetitle. So, for example,
> >
> > DocBook XSL: The
> Complete Guide
> >
> > would be interpreted as equivalent to  > pubwork=“book”>DocBook XSL: The Complete Guide > linkend=“ref.stayton2007”/>
>
> That doesn’t seem unreasonable to me. What I tend to do myself, however,
> is just the following:
>
> 
>
> Which I then render inline as the title from the bibliography entry with
> whatever styling seems appropriate. Saves me from having to type the
> titles each time.
>
> > But, to take it a step further, how about interpreting  > pubwork=“book” linkend=“ref.stayton2007”/> the same way, but pulling
> > the title from the referenced biblioentry/bibliomixed element when the
> > citetitle element is empty.
> >
> > Any thoughts?
>
> That’s what biblioref is for? :-)
>
> Be seeing you,
>   norm
>
> --
> Norman Tovey-Walsh 
> https://nwalsh.com/
>
> > Next to knowing when to seize an opportunity, the most important thing
> > in life is to know when to forego an advantage.--Benjamin Disraeli
>


Re: [docbook-apps] Section[1] only in toc

2020-04-02 Thread Peter Fleck
Brilliant. Worked perfectly.

Peter

On Thu, 2 Apr 2020 at 16:32, Bob Stayton  wrote:

> Hi Peter,
>
> This is what I would try (I haven't tested it, so let me know if it
> doesn't work).
>
> In fo/autotoc.xsl, elements for a TOC are selected as a set of $nodes and
> then those nodes are processed in mode="toc".   In those templates, each
> line in the toc is generated by calling the template named "toc.line".
> This template handles an article:
>
> 
>
> You can create a custom template that matches on only "article" that
> removes the call to "toc.line" and processes the top-level sections in a
> for-each loop:
>
> 
>
>   
>   
> 
>
> The "toc.line" template does not process any subsections.
>
> Bob staytonb...@sagehill.net
>
> On 4/1/2020 2:05 AM, Peter Fleck wrote:
>
> Yes, sorry FO, I know I can use a manual.toc for HTML.
>
> Thanks,
>
> Peter
>
> On Tue, 31 Mar 2020 at 23:27, Bob Stayton  wrote:
>
>> You didn't mention whether this was for FO or HTML type of output.
>>
>> Bob staytonb...@sagehill.net
>>
>> On 3/31/2020 2:08 PM, Peter Fleck wrote:
>>
>> I have an abnormal use case.
>>
>> The source file is a book with many articles, however the TOC is to be
>> first level sections of each article and not the article title itself.
>>
>> Example:
>>
>> 
>>  -- not included
>>  -- included
>>  -- included
>> ...
>> 
>> 
>>  -- not included
>>  -- included
>>  -- included
>> ...
>> 
>>
>> Any pointers would be appreciated.
>>
>> Thanks,
>>
>> Peter
>>
>>


Re: [docbook-apps] Section[1] only in toc

2020-04-01 Thread Peter Fleck
Yes, sorry FO, I know I can use a manual.toc for HTML.

Thanks,

Peter

On Tue, 31 Mar 2020 at 23:27, Bob Stayton  wrote:

> You didn't mention whether this was for FO or HTML type of output.
>
> Bob staytonb...@sagehill.net
>
> On 3/31/2020 2:08 PM, Peter Fleck wrote:
>
> I have an abnormal use case.
>
> The source file is a book with many articles, however the TOC is to be
> first level sections of each article and not the article title itself.
>
> Example:
>
> 
>  -- not included
>  -- included
>  -- included
> ...
> 
> 
>  -- not included
>  -- included
>  -- included
> ...
> 
>
> Any pointers would be appreciated.
>
> Thanks,
>
> Peter
>
>


[docbook-apps] Section[1] only in toc

2020-03-31 Thread Peter Fleck
I have an abnormal use case.

The source file is a book with many articles, however the TOC is to be
first level sections of each article and not the article title itself.

Example:


 -- not included
 -- included
 -- included
...


 -- not included
 -- included
 -- included
...


Any pointers would be appreciated.

Thanks,

Peter


Re: [docbook-apps] Docbook builds? Which is favourite?

2019-09-09 Thread Peter Fleck
Hi Erik,

I would be interested in seeing your gitlab-ci.yml file.
Gitlab certainly offers a lot of potential.

Peter


On Mon, 9 Sep 2019, 09:00 Dave Pawson,  wrote:

> Thanks Erik - fits well with github.
>I never did get on well with xproc, so I'll give that a miss!
>
> regards
>
> On Mon, 9 Sep 2019 at 08:49, Erik Rask  wrote:
> >
> > Hi Dave,
> >
> > Since we store all our sources in GitLab, I went ahead and implemented a
> CI pipeline based on xsltproc and fop. Very neat once you have a workflow
> with all the branching abilities of git. Once you're familiar with it, a
> lot of logic can be applied there that offloads a writing team.
> >
> >
> > Best,
> >
> > /Erik
> >
> > 
> > From: Dave Pawson 
> > Sent: Sunday, February 24, 2019 10:14:08 AM
> > To: docbook-apps
> > Subject: [docbook-apps] Docbook builds? Which is favourite?
> >
> > I started using ant as my docbook builds became more complex.
> > I stayed with it.
> >
> > Recently noted others requesting Maven - then ndw with Gradle.
> >
> > Wondering which tools you find most convenient for docbook?
> >
> > Dave
> >
> > --
> > Dave Pawson
> > XSLT XSL-FO FAQ.
> > Docbook FAQ.
> >
> > -
> > To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
> > For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
> >
>
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> Docbook FAQ.
>
> -
> 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] Merge biblioentry data to citation

2018-11-28 Thread Peter Fleck
Thanks Thomas. This is the way to go I think.
I see the comment in the xref.xsl file




I'll open an issue on Github.

Peter

On Wed, 28 Nov 2018 at 08:58, Thomas Schraitle  wrote:

> Hi Peter,
>
> Am Tue, 27 Nov 2018 18:54:04 +0100
> schrieb Peter Fleck :
>
> > Is there a way to only have a biblioentry once in the bibliography
> > and then cite the details multiple times?
> > So for example here in
> >
> https://www.chicagomanualofstyle.org/tools_citationguide/citation-guide-1.html
> >
> > Something like this? (Though this doesn't work).
> >
> > ..,
> > 315-16...
> > ...
> > ..,
> > 402...
>
> It seems, biblioref would be the appropriate tag for you:
>
>   https://tdg.docbook.org/tdg/5.1/biblioref.html
>
> With biblioref you can add the attributes "begin", "end", and "units"
> like this:
>
>   See  linkend="isbn-9780143111641"/>.
>
> If you process it with version 1.79.2 of the stylesheets, you will get
> this result:
>
>   See [isbn-9780143111641].
>
> It seems, the attributes above are unsupported. I think this is a bug
> as I couldn't find any code which uses them. If you want to take them
> into account, you need to write a customization layer.
>
> One final note about citation. You can use it to reference multiple
> bibliographic entries like this:
>
>See  linkend="A"/>, 
>
> which renders as:
>
>   See [A, B].
>
> (watch for spaces inside ).
>
>
> --
> Gruß/Regards,
> Thomas Schraitle
>
> -
> 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] Merge biblioentry data to citation

2018-11-27 Thread Peter Fleck
Hi,

Is there a way to only have a biblioentry once in the bibliography and then
cite the details multiple times?
So for example here in
https://www.chicagomanualofstyle.org/tools_citationguide/citation-guide-1.html

Something like this? (Though this doesn't work).

..,
315-16...
...
..,
402...
...

  SmithZadieSwing
TimeNew
YorkPenguin
Press20169780143111641  


Would produce:

.Zadie Smith, Swing Time (New York: Penguin Press, 2016), 315–16...
.Zadie Smith, Swing Time (New York: Penguin Press, 2016), 402

That way the details only needed edited/updated once.

Thanks,

Peter


Re: [docbook-apps] Seriesinfo tag not respected

2018-11-19 Thread Peter Fleck

Hi Bernhard,

Use Name, it will get processed by 
iso690.serie template.


Use seriesvolnums if you need to identify the volume.

Peter


On 19/11/2018 07:54, Radu Coravu wrote:

Hi Bernhard,

I looked at the DocBook 5.1 RNG located on their web site:

https://docbook.org/xml/5.1/rng/docbook.rng

and there is no "seriesinfo" element defined in it so probably the 
example here needs to be updated:


https://tdg.docbook.org/tdg/5.1/ch02.html#s.bibliography

Regards,
Radu

Radu Coravu
 XML Editor
http://www.oxygenxml.com

On 11/18/2018 11:38 AM, Bernhard Kleine wrote:

I am using Oxygen xml editor 20.1.

Am 18.11.2018 um 10:36 schrieb Dave Pawson:

How are you validating the xml instance please Bernhard?
  Simple method, against the .rng schema, using Jing
(https://github.com/relaxng/jing-trang)
   See if you still get an error?

HTH


On Sun, 18 Nov 2018 at 09:22, Bernhard Kleine mailto:bernhard.kle...@gmx.net>> wrote:

    This is the header for the biblioentry shown in the previous mail.

    
    http://docbook.org/xml/5.1/rng/docbook.rng;
    
    schematypens="http://relaxng.org/ns/structure/1.0;
    ?>
    http://docbook.org/xml/5.1/sch/docbook.sch;
    
    type="application/xml"
    schematypens="http://purl.oclc.org/dsdl/schematron;
    ?>

    http://docbook.org/ns/docbook;
    
    xmlns:xlink="http://www.w3.org/1999/xlink;
    
    xmlns:ns="http://docbook.org/ns/docbook;
    >

    Am 18.11.2018 um 09:56 schrieb Dave Pawson:

    https://tdg.docbook.org/tdg/5.1/

    Again, no seriesinfo element?
    IIRC the tdg is generated from the schema?

    Bob / Norm would need to state which is definitive.

    https://tdg.docbook.org/tdg/5.1/set.html is set any more
    helpful?

    regards


    On Sun, 18 Nov 2018 at 08:13, Bernhard Kleine
    mailto:bernhard.kle...@gmx.net>> wrote:

    Hi Dave,

    in https://tdg.docbook.org/tdg/5.1/ch02.html#s.bibliography
    there is the seriesinfo tag, however, there is an validation
    error with seriesinfo:

    
   

IsabelVarelaNieto
Julie
A.Chowen
   
    
    
    THE GROWTH
    HORMONE/INSULINLIKE GROWTH FACTOR AXIS DURING
    DEVELOPMENT
    2005
    
    
    ADVANCES IN EXPERIMENTAL MEDICINE AND
    BIOLOGY
    
    10.1007/b106814
    9780387251196
    

    Regards

    Bernhard

    Am 18.11.2018 um 07:31 schrieb Dave Pawson:

https://tdg.docbook.org/tdg/5.1/

    There is no series element Bernhard?

    regards
    On Sat, 17 Nov 2018 at 20:12, Bernhard Kleine 
  wrote:
    I found another identifier which I cannot find in 
docbook5: series


    xml:id="VC05">

   
IsabelVarelaNieto
Julie 
A.Chowen

   
    
    
    THE GROWTH 
HORMONE/INSULINLIKE GROWTH FACTOR AXIS DURING 
DEVELOPMENT

    2005
    ADVANCES IN EXPERIMENTAL MEDICINE AND 
BIOLOGY

    
    10.1007/b106814
    class="isbn">9780387251196

    

    Series throws an error in validation: 'not allowed'.

    I would like to know how to place the series field.

    Thanks a lot!

    Bernhard

    --
    spitzhalde9
    D-79853 lenzkirch
    bernhard.kle...@gmx.net 
    www.b-kleine.com , 
www.urseetal.net 

    -
    thunderbird mit enigmail
    GPG schlüssel: D5257409
    fingerprint:
    08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09


    --
    spitzhalde9
    D-79853 lenzkirch
    bernhard.kle...@gmx.net 
    www.b-kleine.com , 
www.urseetal.net 

    -
    thunderbird mit enigmail
    GPG schlüssel: D5257409
    fingerprint:
    08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09



    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    Docbook FAQ.


    --
    spitzhalde9
    D-79853 lenzkirch
    bernhard.kle...@gmx.net 
    www.b-kleine.com , www.urseetal.net 


    -
    thunderbird mit enigmail
    GPG schlüssel: D5257409
    fingerprint:
    08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09



--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.


--
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09






Re: [docbook-apps] Chapter number in a edited book

2018-11-17 Thread Peter Fleck

Hi Bernhard,

According to iso690, you use /Chapter 
VII/.


Example they give:



Carroll
Lewis

Alices Adventures in Wonderland
online
Textinfo ed. 2.2

Windspiel
[Dortmund, Germany]

November 1994
30 March 1995
Chapter VII
Mad Tea-Party



In Docbook 5 would break up the entry into 2 biblioset 
https://tdg.docbook.org/tdg/5.2/biblioset.html which will be processed 
by iso690.paper.mon



  
        Clinical endocrinology
        978-0865426290
        
    
    
        Islet cell tumours (excluding insulinomas and 
carcinoids)

        40
        




Peter


On 17/11/2018 16:08, Bernhard Kleine wrote:


Hi,

I have the following biblioentry and I want to include the chapter 
number of that part.



   
D.O'Shea
D.Wynick
   S. 
R.Bloom
A.Grossman 


   
   Islet cell tumours (excluding 
insulinomas and carcinoids)

    Clinical endocrinology
   2
    
  Blackwell Scientific Publications
    Oxford Paris Berlin Wien
   
  502514
   1998
    978-0865426290


The chapter  number is 40 and I can add it as "40. Islet cell 
tumours", but I have not found a genuine field name where I can store 
the information. Could you pleas provide one?


Thanks a lot

Greetings

Bernhard

--
spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com,www.urseetal.net
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




Re: [docbook-apps] List of tables (LoT)

2018-10-31 Thread Peter Fleck

HI Bernhard,

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

Check that you have included tables in the generate.toc parameter.

For example:


appendix  toc,title
article/appendix  nop
article   toc,title
book  toc,title,figure,table,example,equation
chapter   toc,title
part  toc,title
preface   toc,title
qandadiv  toc
qandaset  toc
reference toc,title
sect1 toc
sect2 toc
sect3 toc
sect4 toc
sect5 toc
section   toc
set   toc,title



Peter


On 31/10/2018 07:23, Bernhard Kleine wrote:

I checked Docbook 5: the Definitive Guide and Docbook XSL: the complete
Guide for LoT and I did not find it.

Adding tocentry="1" to selected tables did not generate a List of Tables
either. What do I miss? How to make it appear? How to place it?

Regards

Bernhard





[docbook-apps] Combining para role templates

2018-10-12 Thread Peter Fleck
I have a number of templates that add some formatting to xsl:fo, they 
are in the format of:


 

  

  

  

  

  

I want to be able to combine these various templates, something like this:

..

But only the last "role" in the list gets applied to the output. Is this 
combining of roles feasible or do I need to write a combo template (for 
each combination)?


  

  

  

..

Thanks,

Peter


-
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 CSL styles to Docbook stylesheet

2018-06-06 Thread Peter Fleck
Hi all,

I wonder if it would be much work to convert the wealth of resources of
Bibliography styles using the CSL XML (Citation Style Language) on Zotero
to Docbook templates in the same manner as the ISO690 . There is over 9000
styles there at the moment - https://www.zotero.org/styles/ but if we could
even get a few of the main styles like APA, MLA, Chicago, they would be of
immense benefit.

Here for example is Chicago -
https://www.zotero.org/styles/chicago-fullnote-bibliography?source=1

The schema is available here -
https://github.com/citation-style-language/schema


Peter


Re: [docbook-apps] Multiple TOCs

2018-05-11 Thread Peter Fleck

Brilliant Bob, that worked perfectly thank you so much.

The only thing that I need changed is the /shorttoc/ title to be "Brief 
Contents" rather than "Table of Contents" which will refer to the larger 
/toc/, though this is not critical - is that possible?


Do I create a second title page that gets called in the following?

  
    
  

Thanks again,

Peter


On 10/05/18 23:22, Bob Stayton wrote:


Hi Peter,

I had to do something like that, and here is a sample of the XSL 
customization that I used.  You may need to adapt it to your usage.


This is a customization of the "division.toc" template found in 
fo/autotoc.xsl.  Copy that to your customization layer and make the 
changes as marked by the comments.  Then add the new templates in 
mode="shorttoc" that follow.  Those templates just call "toc.line" 
without applying templates to any children, except for the template 
for "part".  Let me know if this isn't clear or doesn't work.



  
  

  
    
  
    
  

  

  
    
  
    1
    false
    
  
    
  
    
  

  
  
    
  
  
    
  

  

  
    
  
  
    
  
    
   
  




  
  
    
  



  
  
    
  
  
  


  
    
  
    
  
  
    
  
    
  


By the way, your attempt to use name="make.book.tocs"> with params cannot work because that named 
template is not set up to accept any parameters.  It's like passing 
undefined arguments to a function.


Bob Stayton
Sagehill Enterprises
b...@sagehill.net
On 5/8/2018 8:16 AM, Peter Fleck wrote:


Hi all,

Is it possible to have multiple TOC's?

I need a short TOC with just  and  titles and then a 
second TOC following after with  for a more detailed TOC.


I tried adding the following to 

   
    
    
   
   
    
    
   

But I'm getting a /Previously Used ID error - ID values must be 
unique within a document /which makes sense.


I know I can manually create a TOC file and include that way - 
https://tdg.docbook.org/tdg/5.2/toc.html but is there a way to do it 
automatically and avoid the duplicate ID?


Thanks,

Peter








Re: [docbook-apps] Multiple TOCs

2018-05-08 Thread Peter Fleck

Thanks Niels,

The TOC is auto-generated so the only way to do it is to modify the /fo/ 
file manually.


Peter


On 08/05/18 18:27, Niels Müller Larsen wrote:

Have you tried removing the id from the toc?

/Niels

Greetings
Niels Müller Larsen
Senior Lecturer IBA Kolding
Bachelor of Web Development Program



On 8 May 2018, at 17.16, Peter Fleck <peterfl...@gmail.com 
<mailto:peterfl...@gmail.com>> wrote:



Hi all,

Is it possible to have multiple TOC's?

I need a short TOC with just  and  titles and then a 
second TOC following after with  for a more detailed TOC.


I tried adding the following to 

   
    
    
   
   
    
    
   

But I'm getting a /Previously Used ID error - ID values must be 
unique within a document /which makes sense.


I know I can manually create a TOC file and include that way - 
https://tdg.docbook.org/tdg/5.2/toc.html but is there a way to do it 
automatically and avoid the duplicate ID?


Thanks,

Peter






[docbook-apps] Multiple TOCs

2018-05-08 Thread Peter Fleck

Hi all,

Is it possible to have multiple TOC's?

I need a short TOC with just  and  titles and then a 
second TOC following after with  for a more detailed TOC.


I tried adding the following to 

  
   
   
  
  
   
   
  

But I'm getting a /Previously Used ID error - ID values must be unique 
within a document /which makes sense.


I know I can manually create a TOC file and include that way - 
https://tdg.docbook.org/tdg/5.2/toc.html but is there a way to do it 
automatically and avoid the duplicate ID?


Thanks,

Peter




Re: [docbook-apps] Re: XML databases

2018-04-07 Thread Peter Fleck

This is a useful discussion.

We make extensive use of git, especially at the beginning of a project.

Do you have any tips for integrating the database approach with a vcs 
like git?


Peter


On 06/04/2018 12:35, Norman Walsh wrote:

Camille Bégnis  writes:

thanks for this interesting discussion, what DB would you use or suggest
for XML?

I’m strongly biased to suggest a particular commercial database, one
that you can download and use for free from developer.marklogic.com.

But I hear good things about BaseX as well and eXist has been around
for ages.

 Be seeing you,
   norm




-
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] No indent on the first paragraph of a page

2017-12-04 Thread Peter Fleck
Hi,

I have the following code that indents the first line of paragraphs:


  

  


Is there a way to not indent the paragraph if it is the first paragraph
of a page?

Using:

Apache FOP 2.2
Docbook 5.1
Stylesheets 1.79.2

Thanks,

Peter

Re: [docbook-apps] RDFa Attributes

2017-07-20 Thread Peter Fleck
That's perfect. Many thanks Bob, much appreciated.

Peter

On 19 Jul 2017 19:05, "Bob Stayton" <b...@sagehill.net> wrote:

> Hi Peter,
> Support for the RDFa Lite attributes new to DocBook 5.1 has not yet been
> added to the XSL stylesheets.  I've filed an issue on the Github site for
> DocBook XSL to get this fixed for the next release.  In the comment
> section, I provided the proposed changes, which could also be used by you
> in a customization layer to implement it now.
>
> https://github.com/docbook/xslt10-stylesheets/issues/40
>
> Bob Stayton
> Sagehill Enterprises
> b...@sagehill.net
>
> On 7/19/2017 1:22 AM, Peter Fleck wrote:
>
>> hi,
>>
>> In the xslt20-stylesheets / html.xsl there is a function
>>
>> 

[docbook-apps] RDFa Attributes

2017-07-19 Thread Peter Fleck
hi,

In the xslt20-stylesheets / html.xsl there is a function



which copies through RDFa attributes.

 

What would the equivalent be for the xsl1.0 stylesheets?

Thanks,

Peter


[docbook-apps] Docbook Info with HTML content in XML

2017-06-16 Thread Peter Fleck

Hi all,

I might be over reaching here. I have a collection of Docbook 5.1 
articles that I want to use as a data source in an app.


I want to retain all docbook info but have the content in html rather 
than docbook.


Below is my current stylesheet. It works in that I get what I had 
expected in XML, however I can't use xpath as there is something 
invalid. My guess is that it is to do with namespaces. I can parse it 
when I exclude the html content but not when it is included.


Any pointers welcome,

Thanks,

Peter

href="http://cdn.docbook.org/release/xsl/current/xhtml5/docbook.xsl"/>
encoding="UTF-8" indent="yes"/>



  
  










  
  

  namespace="http://www.w3.org/1999/xhtml;>


  


  





  
select="normalize-space($generate.toc)"/>

  



  
  

  select="contains($toc.params, 'title')"/>


  




  




-
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] Section titles bottom of a print page when there is as subtitle

2017-05-22 Thread Peter Fleck

Hi,

How do you stop section titles being at the bottom of a print page when 
there is as subtitle? ie. If there isn't space for at least one or two 
lines for the following paragraph the section title moves to the 
following page.


Here's the xml:


 
The Title
The Subtitle

 

So at the bottom of the page is the  followed by the  
and then the  starts on a new page.


I'm using 1.79.2 with Apache FOP 2.2.

I know I can use  but would rather not have 
to put it in XML if there is an XSL solution.


Thanks,

Peter

-
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] Change Label text of Chapter in PDF Bookmarks

2017-02-21 Thread Peter Fleck

Hi,

I have a customization that changes the "Chapter" label to "Lesson" 
using the below:


http://docbook.sourceforge.net/xmlns/l10n/1.0;>






This works fine for the content of the PDF etc. but it stays as 
"Chapter" in the PDF Bookmarks.


Is it possible to change in the PDF as well as the body?

Many thanks,

Peter


-
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] Prepress Support - Crop marks Apache Fop 2.1

2016-09-30 Thread Peter Fleck

Thanks Bob, very helpful.

I fear that it would be a step beyond my technical abilities. If I find 
time I'll give it a go.


Peter


On 28/09/2016 17:49, Bob Stayton wrote:

Hi Peter,
Crop marks would not be part of the DocBook schema, but are a 
formatting feature that the stylesheets need to support (so I'm 
copying to docbook-apps as well).  Since crop marks are not defined in 
the XSLT standard, each XSL-FO implementation has to provide their own 
extension elements to support it.  In the 1.79.1 stylesheets, the crop 
mark extensions for Antenna House and XEP are implemented in 
fo/axf.xsl and fo/xep.xsl, respectively.


Since FOP has their own extension elements for crop marks using the 
fox: namespace, support for them would need to be implemented in 
fo/fop1.xsl.  That could be done in the next release.  If you want to 
try it yourself, you could see if their elements align with either XEP 
or Antenna House elements and write your own extension using fox: 
elements instead.



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

On 9/28/2016 4:07 AM, Peter Fleck wrote:

Hi,

I see that Prepress Support is now available in Apache Fop 2.1. In
particular I am interested in adding crop marks.

https://xmlgraphics.apache.org/fop/2.1/extensions.html

Is this implemented in Docbook 5.1? How would I go about adding it in?

I tried using  with   but it didn't work.

Thanks,

Peter



-
To unsubscribe, e-mail: docbook-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-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] Match on Language

2016-09-09 Thread Peter Fleck

Thanks Bob, that worked perfect.

Peter


On 07/09/16 22:08, Bob Stayton wrote:

Hi Peter,
The complication here is the "all elements" requirement.  Each element 
has its own template for general formatting before it gets down to the 
text where you could set a font.  For example, a section element could 
have a lang attribute. All of the nested elements inside a section 
have their own templates.  I doubt you would want to customize a whole 
raft of elements to achieve this.


Fortunately, you don't have to.  Since you are only changing the font, 
you can operate at the text level.  Try this:





  

  



The match attribute on the template finds elements with the lang 
attribute, and then selects any descendant (using double slash) text() 
nodes, regardless of what the sequence of descendants is.


For the text node, it generates an fo:inline and sets the font-family.

This approach works if you are not adding other custom templates that 
match on text() nodes.  Since the processor won't apply more than one 
matched template, this would have to coordinate with them.


I didn't test this, so let me know if it doesn't work.

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

On 9/7/2016 9:41 AM, Peter Fleck wrote:

Hi all,

I'm trying to set all elements tagged with a particular language to a 
font.


I tried a few combinations of the below but I don't know what I'm doing.
Any help appreciated.


FontName


Many thanks,

Peter


-
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



[docbook-apps] Match on Language

2016-09-07 Thread Peter Fleck

Hi all,

I'm trying to set all elements tagged with a particular language to a font.

I tried a few combinations of the below but I don't know what I'm doing. 
Any help appreciated.



FontName


Many thanks,

Peter


-
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] html 2 docbook

2015-12-22 Thread Peter Fleck

Hi,

I've inherited some documentation in html.
I have most of the xsl sorted to convert it to docbook 5. I am just 
missing footnotes. The xsl is eluding me.


The structure is:

In the text file:
Some text 2 more text.

In the footnotes file:
2 Footnote text.

Anyone know how to pull the content of the footnote inline with the text 
file to create a docbook footnote?


Thanks,

Peter

-
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] Index of People (5.1)

2015-08-25 Thread Peter Fleck

Hi all,

Can anyone give a starter on how to create and /Index of People/ and 
/Index of Organizations/ in 5.1?


I know that I can wrap an  indexterm type=people around the person 
tag in the source file but wondered if the Index could be created 
without the extra XML tagging.


Thanks,

Peter


[docbook-apps] xi:include publisher

2015-06-26 Thread Peter Fleck

HI,

I moved our common xml files to a webserver and now publisher does not 
get included.


I'm using the following syntax:

xi:include xmlns:xi=http://www.w3.org/2001/XInclude; 
href=http:///publisher.xml/


It works great for legalnotice, for colophon etc and it worked when 
the file was local (though that doesn't mean it was correct).
Is it because publisher is not a block item? Is there a better way of 
including the common publisher across documents?


Thanks,

Peter

-
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] xi:include publisher

2015-06-26 Thread Peter Fleck

Hi Richard,

JIng gives me error: element publisher not allowed here; expected 
element  and a long list.


I was using xsltproc

The start of the publisher.xml file is:

?xml version='1.0' encoding='UTF-8'?
publisher xmlns='http://docbook.org/ns/docbook'
  xmlns:svg='http://www.w3.org/2000/svg'
  xmlns:xlink='http://www.w3.org/1999/xlink'
  xmlns:xi='http://www.w3.org/2001/XInclude' version=5.1 
xml:lang=en xml:id=publisher


It works fine for legalnotice which gets included in the output, 
publisher does not.


So I have

?xml version=1.0 encoding=UTF-8?
book xmlns=http://docbook.org/ns/docbook; 
xmlns:svg=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; 
xmlns:xi=http://www.w3.org/2001/XInclude; version=5.1 xml:lang=en 
xml:id=idname

  info
titleBook Title/title
subtitleSubtitle/subtitle
author
  personname
firstnameBob/firstname
surnameSmith/surname
  /personname
/author
xi:include xmlns:xi=http://www.w3.org/2001/XInclude; 
href=http://.../publisher.xml;

  xi:fallbackPublisher Missing/xi:fallback
/xi:include

Thanks,

Peter


On 26/06/15 20:30, Richard Hamilton wrote:

Hi Peter,

What error did you get and what software were you using to do the includes?

Best regards,
Richard Hamilton
---
XML Press
XML for Technical Communicators
http://xmlpress.net
hamil...@xmlpress.net



On Jun 26, 2015, at 11:24, Peter Fleck peterfl...@gmail.com wrote:


HI,

I moved our common xml files to a webserver and now publisher does not get 
included.

I'm using the following syntax:

xi:include xmlns:xi=http://www.w3.org/2001/XInclude; 
href=http:///publisher.xml/

It works great for legalnotice, for colophon etc and it worked when the 
file was local (though that doesn't mean it was correct).
Is it because publisher is not a block item? Is there a better way of including the 
common publisher across documents?

Thanks,

Peter

-
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



[docbook-apps] Page Numbers of chapters with parts left indented

2015-01-26 Thread Peter Fleck

Hi all,

I have been using the docbook-xsl-ns-1.78.1 with a few customizations 
with no problems.


However I have made my first PDF with part's rather than just chapter's.

In the outputted TOC the top level page numbers (parts and preface) are 
in line but the chapter page numbers that are under a part are a tiny 
fraction left. Its far enough to notice but not far enough to show a 
distinction in the levels. Is there somewhere that I need to tweak this 
to make sure they are all in a line? I haven't customized the default 
TOC settings that I know of.


Thanks,

Peter

-
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] audio epubs

2014-09-23 Thread Peter Fleck

Thanks. I look forward to giving this a go.

Peter
skype:peterfleck?call

On 23/09/2014 11:15, Jirka Kosek wrote:

[Replying to docbook-apps where this belongs...]
On 18.9.2014 15:38, Peter Fleck wrote:

Is it possible to do a lot of the work to make audio epubs using
stylesheets?

Everything is possible, it depends on effort you can put into it :-)


First, how to auto generate ids for each para? I'm sure that is
straightforward. (Or if more granularity is needed then id's at the
sentence or word level as needed).

Putting following into your customization layer should do the trick:

xsl:param name=generate.id.attributes select=1/
xsl:param name=generate.consistent.ids select=1/

xsl:template name=id.attribute
   xsl:param name=node select=./
   xsl:param name=conditional select=0/
   xsl:choose
 xsl:when test=$generate.id.attributes = 0
   !-- No id attributes when this param is zero --
 /xsl:when
 xsl:when test=$conditional = 0 or $node/@id or $node/@xml:id
   xsl:attribute name=id
 xsl:call-template name=object.id
   xsl:with-param name=object select=$node/
 /xsl:call-template
   /xsl:attribute
 /xsl:when
   /xsl:choose
/xsl:template

However if you change your DocBook source autogenerated IDs will change.


Second, populate the smil file with the ids

smil xmlns=http://www.w3.org/ns/SMIL;
xmlns:epub=http://www.idpf.org/2007/ops; version=3.0
 body
 seq id=id1 epub:textref=index.xhtml epub:type=bodymatter
chapter
 par id=paragraph1
 text src=index.xhtml#para-id1/
 audio src=audio/file.mp3 clipBegin=0:00:02.000
clipEnd=0:00:15.000/
 /par
 par id=paragraph2
 text src=index.xhtml#para-id2/
 audio src=audio/file.mp3 clipBegin=0:00:15.000
clipEnd=0:00:25.000/
 /par
 
 /seq
 /body
/smil

The smil file would need manually editing for the clipBegin and clipEnd
for each but that's fine. The audio src could be passed as a parameter.
Then add something like .-epub-media-overlay-active {background-color:
#abc;} to the css.

Have you considered generating this SMIL file automatically? I can
imagine putting custom attributes into DocBook document, something like:

chapter my:audio=file.mp3
   titleFoo/title
   para my:begin=0:00:02.000 my:end=0:00:15.000.../para
   para my:begin=0:00:15.000 my:end=0:00:25.000.../para
   ...

 From such markup you can quite easily generate SMIL file automatically.


Finally modify the package.opf to add

 meta property=media:duration
refines=#chapter1_overlay0:04:30.000/meta
 meta property=media:duration
refines=#chapter2_overlay0:03:30.000/meta
 
 meta property=media:duration0:08:00.000/meta
 meta property=media:narratorNarrator Name/meta
 meta property=media:active-class-epub-media-overlay-active/meta
   /metadata
   manifest
 item id=ncx href=toc.ncx media-type=application/x-dtbncx+xml/
 item id=htmltoc properties=nav
media-type=application/xhtml+xml href=ar01-toc.xhtml/
 item media-type=text/css id=docbook-css href=docbook-epub.css/
 item id=id-idm21776 href=index.xhtml
media-type=application/xhtml+xml media-overlay=chapter1_overlay/
 item id=chapter1_overlay href=chapter1_overlay.smil
media-type=application/smil+xml/
 

Is something like this doable?

Yes, generation of OPF file is split into set of relative small
templates which you can easily override. Look into
epub3/epu3-element-mods.xsl file. For example metadata part is generated
by the following template:

xsl:template name=package.metadata

   xsl:element name=metadata namespace={$opf.namespace}

 xsl:call-template name=metadata.identifier/
 xsl:call-template name=metadata.title/
 xsl:call-template name=metadata.language/
 xsl:call-template name=metadata.modified/
 xsl:call-template name=metadata.cover/
 xsl:call-template name=metadata.other.info/

   /xsl:element
/xsl:template

You can generate this template manually, or put your custom elements
inside info elements and handle them in special opf.metadata mode.

info
   ...
   media:narratorNarrator Name/media:narrator
/info

xsl:template match=media:* mode=opf.metadata
   meta property=media:{local-name(.)}xsl:value-of select=.//meta
/xsl:template

HTH,

Jirka





[docbook-apps] Splitting Chapter label and Title in html output

2014-09-10 Thread Peter Fleck

Hi all,

Is it possible to split the Chapter label and Title in the html output. 
I want to have:


Chapter 1.
The title of the chapter

I did it ages ago on the FO output but can't replicate what I did for 
the html. Which template should I be modifying?


Thanks,

Peter

-
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] Multiple biblioid's extra itemref in epub3 spine

2014-09-05 Thread Peter Fleck

Hi all.

I'm probably doing something silly but here's my problem:
I use the /docbook-xsl-ns-1.78.1/epub3/profile-chunk.xsl/ style sheet in 
a custom layer and call


Either --stringparam  profile.condition epub
or --stringparam  profile.condition mobi

And it picks the correct /biblioid/ below for use in either the epub or 
a second epub for kindlegen.


biblioid class=other otherclass=mobi 
condition=mobi978---7-/biblioid
biblioid class=other otherclass=epub 
condition=epub978---8-/biblioid
biblioid class=other otherclass=print 
condition=print9789-/biblioid


My problems is that which ever comes second (ie mobi or epub) adds 
an extra itemref to the spine in the package.opf. This gives an error like -


ERROR   OEBPS/package.opf   62  37  item with id 'id-idp1288160' 
not found


I can delete these manually but I have an automated script so would 
prefer a different solution.

My guess is my Docbook is wrong.

Thanks for your help,

Peter


[docbook-apps] cite with class and title

2014-08-14 Thread Peter Fleck

Hi,

I'm using a third-party javascript that requires the cite tag with the 
class and title populated.

I can't work out how to do it in docbook.

I have used the below as a temporary work around which works but would 
prefer it in docbook if possible.

html:cite class=--- title=---Cited Content/html:cite

Thanks,

Peter

-
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] Redundant end tags been removed

2014-07-23 Thread Peter Fleck

Hi guys,

I'm trying to add the below to each chunked html page.

script type=text/javascript 
src=//s7.addthis.com/js/300/addthis_widget.js#pubid=XXX/script

div class=addthis_sharing_toolbox/


What happens is that the script tag gets shortened to

script type=text/javascript 
src=//s7.addthis.com/js/300/addthis_widget.js#pubid=XXX/


ie. the redundant closing tag is removed and the end slash added.

This stops the rest of the html being displayed. If I manually change 
the html after it has been created  to the top, the AddThis sharing 
buttons appear.


I know there is probably a simple answer to this but can't get it. Is 
there a way to stop the script tag getting shortened?


Thanks,

Peter


Re: [docbook-apps] Redundant end tags been removed

2014-07-23 Thread Peter Fleck

Thanks Stefan,

When I put something between the /script it works, although obviously 
it gets copied to each instance.

However at the moment I'm happy to just getting it working.

Peter


On 23/07/2014 20:10, Stefan Knorr wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi Peter,

We had a similar problem here, we did not find a solution that fit us
too well (we're using DocBook 4, XHTML 1.1  Saxon 6 or Xsltproc
[interchangeably]). Xsltproc always just worked, but Saxon was troubling.

Despite the tone, everything below is iirc, because I explored that
topic a year or so ago. Also, I make the assumption that you are using
XHTML  Saxon, too. Correct me if I am wrong about that.

| The trouble is that you are generating X[HT]ML, but browsers
| generally think they are being served HTML and you need to convince
| them otherwise.

* you could just continue to create your XHTML (you do use XHTML,
   right?) and make _sure_ your server serves it with the
   application/xhtml+xml MIME type; caveats:
   + not sure how to make that work locally
   + you might run into trouble on IE 7 or below (which generally
 likes to show source trees, I think)

* you could switch to HTML 4 or HTML 5 (no X!), in this case, the
   DocBook stylesheets should take care of correctly setting the
   saxon:output tag

* if you're using Saxon, take a look at the saxon:output tag and the
   HTML mode it supports; caveat:
   + finicky, especially when you want to support both Saxon and
 another processor

* the quick (and error-prone) solution would be to add something in
   between the start and end tag of the script, such as an XML comment
   (NB: you would have to do this for other tags that require such
   behaviour, too, e.g. link)


Ultimately, I too would still be interested in how to properly solve
this...


Stefan.

- -- 
SUSE LINUX Products GmbH, Maxfeldstraße 5, D-90409 Nürnberg

Geschäftsführer: Jeff Hawn, Jennifer Guild, Felix Imendörffer
HRB 16746 (Amtsgericht Nürnberg)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iF4EAREIAAYFAlPP+ngACgkQ5AP3bIqhlM0bqgEApSiCXu710LPOcDGyEg+2GMSm
ns6WfCOAu1+FDyWwCV8BAKLD23C29yaOXaymwRWNJacqfWX51E440ptgoSTTt15s
=qOgU
-END PGP SIGNATURE-

-
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] Endorsements

2014-05-29 Thread Peter Fleck

Hi guys,

What's the best way to mark-up endorsements and content that either goes 
before or after the main book? ie. Content before the titlepage and 
after the index.
An example is endoresements are placed sometimes at the beginning and 
sometimes at the end. Also there is the occasion where a page of content 
is added at the end of the book. Both of these are generally excluded 
from the TOC.


I assume if it goes before the titlepage it gets selected in 
xsl:template name=book.titlepage.before.recto? But I just wanted to 
check how people have marked endorsements up?


Many thanks, appreciate the help,

Peterskype:peterfleck?call



[docbook-apps] titlepage customization - found more than one template

2014-05-09 Thread Peter Fleck
Ok, I've tried repeatedly and now have to admit that I must be doing 
something silly somewhere.


I copied the /titlepage.templates.xml/ made the changes I wanted used 
xsltproc to create my custom titlepage.xsl.

In my customization file I have:

?xml version='1.0'?

xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:d=http://docbook.org/ns/docbook; 
xmlns:exsl=http://exslt.org/common; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:ng=http://docbook.org/docbook-ng; 
xmlns:db=http://docbook.org/ns/docbook; exclude-result-prefixes=db ng exsl d version=1.0

xsl:output method=xml indent=no /

xsl:include href=../docbook-xsl-ns-1.78.1/fo/docbook.xsl /

xsl:include href=myTitlePages.xsl /





/xsl:stylesheet


The stylesheet was working fine before I add the titlepage customizations.

Now I get:

(Location of error unknown) java.lang.RuntimeException: ElemTemplateElement 
error: Found more than one template named: component.list.of.unknowns.titlepage


Am I missing some part of the titlepage customization process?

Thanks,

Peter
skype:peterfleck?call



Re: [docbook-apps] titlepage customization - found more than one template

2014-05-09 Thread Peter Fleck

Brilliant yeah that worked. Many thanks, appreciate it.

Peterskype:peterfleck?call

On 09/05/14 17:49, Bob Stayton wrote:

Hi Peter,
Change the xsl:include to xsl:import.  That was a mistake in my book, 
added to the errata page:


http://sagehill.net/book-errata.html

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

On 5/9/2014 7:38 AM, Peter Fleck wrote:

Ok, I've tried repeatedly and now have to admit that I must be doing
something silly somewhere.

I copied the /titlepage.templates.xml/ made the changes I wanted used
xsltproc to create my custom titlepage.xsl.
In my customization file I have:

?xml version='1.0'?

xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:d=http://docbook.org/ns/docbook;
xmlns:exsl=http://exslt.org/common;
xmlns:fo=http://www.w3.org/1999/XSL/Format;
xmlns:ng=http://docbook.org/docbook-ng;
xmlns:db=http://docbook.org/ns/docbook; exclude-result-prefixes=db ng
exsl d version=1.0

 xsl:output method=xml indent=no /

 xsl:include href=../docbook-xsl-ns-1.78.1/fo/docbook.xsl /

 xsl:include href=myTitlePages.xsl /





/xsl:stylesheet


The stylesheet was working fine before I add the titlepage 
customizations.


Now I get:

(Location of error unknown) java.lang.RuntimeException:
ElemTemplateElement error: Found more than one template named:
component.list.of.unknowns.titlepage


Am I missing some part of the titlepage customization process?

Thanks,

Peter
skype:peterfleck?call






[docbook-apps] HTML5 Audio + Video multiple sources

2013-12-07 Thread Peter Fleck

Hi all,

Is it possible in html5 output of audio and video to have multiple 
sources and fallback?


I'm thinking specifically of for example:

video
  source src=video.ogg type=video/ogg /
  source src=video.mp4 type=video/mp4 /
  source src=video.webm type= video/webm
/video

If tried different ways but haven't been able to do it yet, is it possible?

Many thanks,

Peter


[docbook-apps] html5 align image right

2013-09-05 Thread Peter Fleck

Hi all,

Sorry if I'm doing something silly here.

I have an inline image which I want right aligned in the html 5 output 
(I'm using Docbook 5.1 Article).


Here's my docbook:

inlinemediaobject
  imageobject
imagedata fileref=http://jpg; contentwidth=200 
align=right format=jpg/imagedata

  /imageobject
/inlinemediaobject

With Oxygen it works fine producing this output:

pspan class=inlinemediaobjectimg src=http://jpg; 
align=right width=200//spanSome Text/p


Though it uses /align/ rather than css.

I prefer using xsltproc and am using docbook-xsl-ns-1.78.1 stylesheets.

The same docbook code as above produces the following:

pspan class=inlinemediaobjectimg style=text-align: right;  
src=http://jpg; width=200//spanSome Text/p


However the image is not being aligned to the right. Am I doing 
something wrong?


Peterskype:peterfleck?call



Re: [docbook-apps] html5 align image right

2013-09-05 Thread Peter Fleck

Thanks Stefan - that worked when I changed the html manually.

How do I get the stylesheet to create it with float rather than 
text-align without me having to manually change the html?


Peter


On 05/09/13 16:04, Stefan Knorr wrote:

Hi Peter,

On Do, 2013-09-05 at 13:15 +0200, Peter Fleck wrote:

pspan class=inlinemediaobjectimg style=text-align: right; 
src=http://jpg; width=200//spanSome Text/p

However the image is not being aligned to the right. Am I doing
something wrong?

Well, it's called text-align for a reason. :)
You may want to try with float: right;, but that has its own quirks,
of course. See https://developer.mozilla.org/en-US/docs/Web/CSS/float

Stefan.






Re: [docbook-apps] html5 align image right

2013-09-05 Thread Peter Fleck

Ah, perfect. That was what I was wanting. Many thanks.

Peter

On 05/09/13 18:39, Bob Stayton wrote:
Well, if you are going to float it, it should not be an 
inlinemediaobject, which is intended to appear inline.  You could 
instead use this in your source file:

informalfigure floatstyle=right
  mediaobject
imageobject
  imagedata ...
imageobject
  mediaobject
/informalfigure
paraSome Text/para
The informalfigure wrapper lets you add a floatstyle attribute, 
without adding a title.

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

*From:* Peter Fleck mailto:peterfl...@gmail.com
*Sent:* Thursday, September 05, 2013 8:56 AM
*To:* Stefan Knorr mailto:skn...@suse.de
*Cc:* docbook-apps@lists.oasis-open.org 
mailto:docbook-apps@lists.oasis-open.org

*Subject:* Re: [docbook-apps] html5 align image right

Thanks Stefan - that worked when I changed the html manually.

How do I get the stylesheet to create it with float rather than 
text-align without me having to manually change the html?


Peter


On 05/09/13 16:04, Stefan Knorr wrote:

Hi Peter,

On Do, 2013-09-05 at 13:15 +0200, Peter Fleck wrote:

pspan class=inlinemediaobjectimg style=text-align: right; 
src=http://jpg;  width=200//spanSome Text/p

However the image is not being aligned to the right. Am I doing
something wrong?

Well, it's called text-align for a reason. :)
You may want to try with float: right;, but that has its own quirks,
of course. Seehttps://developer.mozilla.org/en-US/docs/Web/CSS/float

Stefan.