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] Query: bug in <citation>#PCDATA</citation>


Hi Jirka,
Yes, I think his point was that this is a bug in the stylesheet. 
Specifically this template in html/inline.xsl:

<xsl:template match="citation">
  <!-- todo: integrate with bibliography collection -->
  <xsl:variable name="targets" select="(//biblioentry | 
//bibliomixed)[abbrev = string(current())]"/>

  <xsl:choose>
    <xsl:when test="$targets">
      <xsl:call-template name="xref">
        <xsl:with-param name="targets" select="$targets"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:message>
        <xsl:text>Citation to nonexistent publication abbrev: </xsl:text>
        <xsl:value-of select="."/>
      </xsl:message>
      <xsl:text>[</xsl:text>
      <xsl:call-template name="inline.charseq"/>
      <xsl:text>]</xsl:text>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

The case when there is no matching target should not generate an error 
message because such a match is not required.  The problem, of course, is 
trying to guess when a target was intended but none was found because of a 
typo.  Since this is PCDATA, I don't think there is any way to tell. I 
usually recommend people use xref directly if they want a link that can be 
verified.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Jirka Kosek" <jirka@kosek.cz>
To: "Ron Catterall" <ron@catterall.net>
Cc: <docbook-apps@lists.oasis-open.org>
Sent: Monday, August 28, 2006 2:42 PM
Subject: Re: [docbook-apps] Query: bug in <citation>#PCDATA</citation>


Ron Catterall wrote:

> #PCDATA is allowed in <citation> (Docbook 4 manual), but transformation 
> to xhtml produces warning messages which suggest that the content of 
> <citation> is assumed to be a <biblioref>.  The XHTML output inserts [ 
> and ] around the #PCDATA within <citation></citation> as it would do if 
> this were a <biblioref>. Same for <citation> a child of <para> or 
> <attribution>.
>
> The Warning messages produced are:
> Citation to nonexistent publication abbrev: 35-36
> Citation to nonexistent publication abbrev: 13-16

I think that this behavior is completely aligned with TDG. See:

http://docbook.org/tdg/en/html/citation.html

"The content of a Citation is assumed to be a reference string, perhaps
identical to an abbreviation in an entry in a Bibliography."

Why do you think that this is a bug?

> FO transformation to PDF with XEP 4.6 interprets the <citation> 
> correctly - no warning or error messages, and no [ and ] wrapped around 
> the citation.

Then this is bug in FO stylesheets that should be fixed.

-- 
------------------------------------------------------------------
   Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
------------------------------------------------------------------
   Profesionální školení a poradenství v oblasti technologií XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
                    Nejbližší termíny školení:
     ** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 **
      ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
------------------------------------------------------------------
   http://xmlguru.cz    Blog mostly about XML for English readers
------------------------------------------------------------------





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