OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] [oXygen-user] Pagenumbers in crossref with my own style


Hi Bob,

after unsetting insert.xref.page.number and replacing the customization with your text, there is no number at all.

Whatelse could be missing?

Bernhard


Am 26.09.2018 um 20:05 schrieb Bob Stayton:

Hi Bernard,

There are two issues. One is that the @name attribute in a l:template element should be the name of the element you are pointing to, not pointing from. So that should be name="sect1" instead of "xref".

The other is that unless you have section numbering turned on (if set section.autolabel="1"), then the context named "xref-number-and-title" is not applied because the target element sect1 does not have a number. So context="xref" is used instead.

One other point: the insert.xref.page.number parameter is used to append a page reference to the normal generated text. In your case, you are replacing the normal generated text with a page reference, so you don't want that param set unless you want page references elsewhere.

So your customization should look like this:

ÂÂÂ <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
ÂÂÂÂÂÂÂ <l:l10n language="de">
ÂÂÂÂÂÂÂÂÂÂÂ <l:context name="title">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <l:template name="table" text="Tabelle %t."/>
ÂÂÂÂÂÂÂÂÂÂÂ </l:context>
ÂÂÂÂÂÂÂÂÂÂÂ <l:context name="xref-number-and-title">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <l:template name="table" text="(in Tabelle&#8820;%t&#8221;)"/>
ÂÂÂÂÂÂÂÂÂÂÂ </l:context>
ÂÂÂÂÂ       <l:context name="xref">
                <l:template name="sect1" style="PageInParen" text=" (S. %p)"/>
            </l:context>
      Â </l:l10n>
ÂÂÂ </l:i18n>


Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
On 9/26/2018 10:27 AM, Bernhard Kleine wrote:
I have the following xml example and the corresponding xls stylesheet.
The pagenumber, however, is not shown as S. 1, but [1] not respecting
the style for the pagenumer. 
The insert.xref.page.number is set to yes.

I am working with Oxygen XML editor 20.1 on win7(64bit). 

What is missing?

Regards

Bernhard

testref.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="" class="moz-txt-link-rfc2396E" href="http://docbook.org/xml/5.1/rng/docbookxi.rng" moz-do-not-send="true">"http://docbook.org/xml/5.1/rng/docbookxi.rng"
schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="" class="moz-txt-link-rfc2396E" href="http://docbook.org/xml/5.1/sch/docbook.sch" moz-do-not-send="true">"http://docbook.org/xml/5.1/sch/docbook.sch"
type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<chapter xmlns="http://docbook.org/ns/docbook" xml:lang="de"
ÂÂÂ xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:ns5="http://www.w3.org/2000/svg"
ÂÂÂ xmlns:ns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
ÂÂÂ version="5.1">
ÂÂÂ <title>Nachtfalter</title>
ÂÂÂ <para>Die bis Herbst 2018 fotografierten Nachtfalter
(GroÃschmetterlinge) gehÃren zu folgenden
ÂÂÂÂÂÂÂ Schmetterlingsfamilien (in Klammern die Anzahl der bis Ende
Sept. 2018 gefundenen
ÂÂÂÂÂÂÂ Arten):</para>
ÂÂÂ <para><itemizedlist>
ÂÂÂÂÂÂÂÂÂÂÂ <listitem>
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <para>Zygaenidae - Widderchen (6)<xref
linkend="Zygaenidae" xrefstyle="PageInParen"
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ /></para>
ÂÂÂÂÂÂÂÂÂÂÂ </listitem>
ÂÂÂÂÂÂÂ </itemizedlist>
ÂÂÂ </para>

ÂÂÂ <sect1 xml:id="Zygaenidae" xreflabel="">
ÂÂÂÂÂÂÂ <title>Zygaenidae - Widderchen </title>
ÂÂÂÂÂÂÂ <table frame="none">
ÂÂÂÂÂÂÂÂÂÂÂ <title>Zygaenida</title>
ÂÂÂÂÂÂÂÂÂÂÂ <tgroup cols="2" align="center">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <tbody>

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <row valign="middle" rowsep="0">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <entry>Beilfleck-Widderchen</entry>
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <entry>Thymian/Bibernell-Widderchen</entry>
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </row>
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ </tbody>
ÂÂÂÂÂÂÂÂÂÂÂ </tgroup>
ÂÂÂÂÂÂÂ </table>
ÂÂÂ </sect1>
</chapter>

Falterbuechlein.xls

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
ÂÂÂ <xsl:import
href="" class="moz-txt-link-rfc2396E" href="http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl" moz-do-not-send="true">"http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl"/>
ÂÂÂ <xsl:param name="paper.type" select="'a4'"/>
ÂÂÂ <xsl:param name="page.orientation" select="'portrait'"/>
ÂÂÂ <xsl:param name="local.l10n.xml" select="document('')"/>
ÂÂÂ <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
ÂÂÂÂÂÂÂ <l:l10n language="de">
ÂÂÂÂÂÂÂÂÂÂÂ <l:context name="title">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <l:template name="table" text="Tabelle %t."/>
ÂÂÂÂÂÂÂÂÂÂÂ </l:context>
ÂÂÂÂÂÂÂÂÂÂÂ <l:context name="xref-number-and-title">
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <l:template name="table" text="(in
Tabelle&#8820;%t&#8221;)"/>
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ <l:template name="xref" style="PageInParen" text=" (S.
%p)"/>
ÂÂÂÂÂÂÂÂÂÂÂ </l:context>
ÂÂÂÂÂÂÂ </l:l10n>
ÂÂÂ </l:i18n>
</xsl:stylesheet>


-- 
spitzhalde9
D-79853 lenzkirch
bernhard.kleine@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

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]