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: "info" is "articleinfo"?! was Can't get /article/info/title



This works, but I'm still confused.
...
<xsl:choose>
    <xsl:when test="articleinfo/title">
        <xsl:value-of select="articleinfo/title"/>
    </xsl:when>
    <xsl:when test="title">
        <xsl:value-of select="title"/>
    </xsl:when>
</xsl:choose>
...

I figured out I need to test and select "articleinfo/title" not 
"info/title", but now I'm curious how this magic occurs? How does "info" 
in my document get aliased as "articleinfo" and more importantly how to 
know where else this sort of behavior may occur?



Lou Springer wrote:
> I have this
>
> <article xmlns="http://docbook.org/ns/docbook"; version="5.0">
>    <!--<title>Test Title</title> works when title is here -->
>    <info>
>        <title>Test Title</title> <!-- doesn't work here -->
>        <author>
>            <personname>The Author</personname>
>        </author>
>    </info>
>    <section>
>        <title>Paragraph</title>
>        <para> Lorem ipsum dolor sit amet, consectetuer adipiscing 
> elit. </para>
>    </section>
> </article>
>
>
> With the following customization
>
>    <xsl:template match="article">
>
>        <fo:page-sequence master-reference="titlepage-first">
>            <fo:flow flow-name="xsl-region-body">
>                <xsl:call-template name="front.cover"/>
>            </fo:flow>
>        </fo:page-sequence>
>
>        <xsl:apply-imports/>
>    </xsl:template>
>
>    <xsl:template name="front.cover">
>        <fo:block space-before="2in" 
> space-before.conditionality="retain" font-family="Helvetica"
>            font-size="24pt" text-align="start" font-weight="bold">
>            <fo:inline>
>                <xsl:choose>
>                    <xsl:when test="/article/info/title">
>                        <xsl:value-of select="/article/info/title"/>
>                    </xsl:when>
>                    <xsl:when test="/article/title">
>                        <xsl:value-of select="/article/title"/>
>                    </xsl:when>
>                </xsl:choose>
>            </fo:inline>
>        </fo:block>
>    </xsl:template>
>
>
> I get the title when located at "/article/title" but not  when at 
> "/article/info/title". What am I missing?
>
> Lou
>

S/MIME Cryptographic Signature



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