[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RESOLVED: "info" is "articleinfo"?!
It helps if you use the docbook 5 style sheets! After installing and importing the docbook.xsl from docbook-xsl-ns-1.73.2 into my customization, things are working the way I'd expect. <xsl:element name="fo:inline"> <xsl:choose> <xsl:when test="db:info/db:title"> <xsl:value-of select="db:info/db:title"/> </xsl:when> <xsl:when test="db:title"> <xsl:value-of select="db:title"/> </xsl:when> </xsl:choose> </xsl:element> It looks like oxygen xml only comes with docbook 4 stylesheets, and I was just pointing to those. Bad idea. Lou Springer wrote: > > 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]