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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] Unhappy XEP: anchor as child of section


Yes, you should be able to place the anchor as a child of section.  This is 
a deficiency of the stylesheet that it doesn't handle it.  It is similar to 
the problem of indexterms markers needing to exist in both contexts.  If you 
would file a bug report on the DocBook SourceForge site, it will get fixed.

It hasn't come up before because when sections are processed, they are 
normally put inside an fo:block, so the fo:inline is not output at the top 
level.  I guess the context of your xi:include is not inside a section 
element, right?

Your customization works for me. I can't see why it would not work for you. 
You might put an xsl:message inside it to see if it is being reached, and 
debug from there.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "David Priest" <davidp@meyersound.com>
To: <docbook@lists.oasis-open.org>
Sent: Friday, April 03, 2009 9:36 AM
Subject: [docbook] Unhappy XEP: anchor as child of section


>I would like to place an anchor as a direct child of a section, so  that 
>when I xi:include the content of the section, I have an anchor  with which 
>to cross-reference the content.
>
> Unfortunately, the stock transformations always convert the anchor to  an 
> inline, regardless the parentage of the anchor.
>
> (A) Is there a reason why I should not be able to insert an anchor as  the 
> child of the section?
>
> (B) Assuming that I should be able to, why on earth is this  customization 
> to the templates not working?  I could swear the test  should work; it 
> looks to be analogous to any number of examples in the  transformation 
> code.  I is teh dumb, I guess.
>
>     <xsl:template match="d:anchor">
>         <xsl:variable name="id">
>             <xsl:call-template name="object.id"/>
>         </xsl:variable>
>         <xsl:choose>
>             <xsl:when test="parent::d:section">
>                 <fo:block id="{$id}"/>
>             </xsl:when>
>             <xsl:otherwise>
>                 <fo:inline id="{$id}"/>
>             </xsl:otherwise>
>         </xsl:choose>
>     </xsl:template>
>
> (For benefit of those who might search the mailing list for xi:include/ 
> xinclude examples, I'm using variations on this construct:
>
> <xi:include
> href="source.xml"
>         xpointer="xmlns(db=http://docbook.org/ns/docbook)
> xmlns(xi=http://www.w3.org/2001/XInclude)
> xpointer(//db:section[@xml:id='section_id']/db:title/following- 
> sibling::*)"
> />
> )
> -- 
> David Priest  davidp@meyersound.com  priest@sfu.ca
> Polaris       250.549.2558 x249
> Documentation and Informatics Geek.
> Django Ponies Wrangler.
>
>
> CONFIDENTIALITY NOTICE:  This electronic mail message and any attachment 
> hereto may contain confidential information of Meyer Sound Laboratories, 
> Incorporated and is intended for the personal and confidential use of the 
> designated recipient(s) only.  If you are not the intended recipient (or 
> responsible for delivering the message to the intended recipient), you 
> have received this message in error and any review, distribution, or 
> copying of this message or any attachment hereto is prohibited.  If you 
> have received this message in error, please promptly notify the sender and 
> permanently delete it from your computer.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>
>
> 



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