I tracked down the source of this problem and fixed it in SVN, so it will not be a
problem in future releases. Thanks for the report.
Bob Stayton
Sagehill Enterprises
[email protected]
----- Original Message -----
From: "Jason Zech" <[email protected]>
To: "Jason Zech" <[email protected]>; "DocBook Apps"
<[email protected]>
Sent: Tuesday, July 10, 2012 12:43 PM
Subject: [docbook-apps] RE: rootid parameter
Solved my problem with the rootid parameter.
The issue appears to be that the parameter is written to work with the old DB
attribute of "id" but doesn't work with the new version: "xml:id".
I picked up the template below from the xhtml/profile-docbook.xsl stylesheet and added
it to my custom layer, changing the 3 instances of @id with @xml:id. It works fine
now.
Should this be logged as a bug as the parameter doesn't work with DB 5.0 as
written?
<xsl:template match="/">
<!-- * Get a title for current doc so that we let the user -->
<!-- * know what document we are processing at this point. -->
<xsl:variable name="doc.title">
<xsl:call-template name="get.doc.title"/>
</xsl:variable>
<xsl:choose>
<!-- include extra test for Xalan quirk -->
<xsl:when test="false()"/>
<!-- Can't process unless namespace removed -->
<xsl:when test="false()"/>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$rootid != ''">
<xsl:choose>
<xsl:when test="count($profiled-nodes//*[@xml:id=$rootid]) = 0">
<xsl:message terminate="yes">
<xsl:text>ID '</xsl:text>
<xsl:value-of select="$rootid"/>
<xsl:text>' not found in document.</xsl:text>
</xsl:message>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$collect.xref.targets = 'yes' or
$collect.xref.targets = 'only'">
<xsl:apply-templates select="key('id', $rootid)"
mode="collect.targets"/>
</xsl:if>
<xsl:if test="$collect.xref.targets != 'only'">
<xsl:apply-templates select="$profiled-nodes//*[@xml:id=$rootid]"
mode="process.root"/>
<xsl:if test="$tex.math.in.alt != ''">
<xsl:apply-templates select="$profiled-nodes//*[@xml:id=$rootid]"
mode="collect.tex.math"/>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:if test="$collect.xref.targets = 'yes' or
$collect.xref.targets = 'only'">
<xsl:apply-templates select="$profiled-nodes"
mode="collect.targets"/>
</xsl:if>
<xsl:if test="$collect.xref.targets != 'only'">
<xsl:apply-templates select="$profiled-nodes" mode="process.root"/>
<xsl:if test="$tex.math.in.alt != ''">
<xsl:apply-templates select="$profiled-nodes"
mode="collect.tex.math"/>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
From: Jason Zech [mailto:[email protected]]
Sent: Tuesday, July 10, 2012 10:39 AM
To: DocBook Apps
Subject: [docbook-apps] rootid parameter
Hi again (so soon),
I also cannot seem to get the rootid parameter working in 1.77.1 to single file XHTML
or HTML.
I've tried with both Xalan and Saxon 6.5.6. With both processors, I get a message that
the ID could not be found in the document.
I've tried both:
<xsl:param name="rootid" select="'test'"/>
And
<xsl:param name="rootid">test</xsl:param>
I'm using valid IDs in my source docs, and while I'm using xinclude, I've tried
testing it on elements literally within a document and it doesn't seem to work there
either.
Any suggestions of what I might be doing wrong?
Thank you,
jz
Jason Zech | Project Manager, Digital Workflow
[p] 773-281-1818 x212 | [email protected]
LoyolaPress. | A Jesuit Ministry | 100 Years of Service
3441 N. Ashland Ave. | Chicago, IL 60657 | www.loyolapress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]