Re: [xep-support] Cross references to figures generates question marks

From: Mark Lautman <mlautman@hns.com>
Date: Fri Oct 05 2007 - 13:08:24 PDT
Ken's observation put me on the path of the righteous. The following creates the targets for cross-references:
 
 <xsl:template match="figure">
  <fo:block>
   <xsl:attribute name="id">
    <xsl:value-of select="generate-id()"/>
   </xsl:attribute>
 (other stuff...) 
</fo:block>
</xsl:template> 
 
 
-----owner-xep-support@renderx.com wrote: -----

To: xep-support@renderx.com, xep-support@renderx.com
From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
Sent by: owner-xep-support@renderx.com
Date: 09/29/2007 02:24AM
Subject: Re: [xep-support] Cross references to figures generates question marks


At 2007-09-28 16:24 -0400, Mark Lautman wrote:
>I'm creating cross references to a heading and a figure. The xrefs
>to the headings work, but not to the figures.
>
>In the XML file I have
>
><body>See the section <heading_link target="second_heading" />.</body>
><body>See the figure <figure_link target="browser_settings" />.</body>
>...
><Heading1 id="second_heading">Installation</Heading1>
><figure src="browser_settings.tif" id="browser_settings"/>
>
>In the XSL file I have
>
>  <xsl:template match="heading_link">
>...
>  <xsl:template match="figure_link">
>...
>Result:
>See the section on page 3.
>See the figure on page ?.
>...
>3) The engine gives the following mesasge: unresolved internal
>destination: 'browser_settings'

What you are not showing is the template match="figure" ... that is
where your problem is ... you are not seeding the area tree with an
id= that can be resolved.

Review your template match for figure and add id= to the one of the
areas you create that makes sense for your situation.

>This is for an unstructured XML file (no DTD).

Thankfully, that is irrelevant if you are using key().  If you are
using id() then it is relevant and you can use:

   <!DOCTYPE doc
   [
   <!ATTLIST Heading1 id ID #IMPLIED>
   <!ATTLIST figure id ID #IMPLIED>
   ]>
   <doc>
     ....

There is no need to have a *complete* DTD to use the id() function;
just the ATTLIST declarations are sufficient.

I hope this helps.

. . . . . . . . . . . . Ken


--
Upcoming public training: UBL and code lists Oct 1/5; Madrid Spain
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Jul'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
------------------- (*) To unsubscribe, send a message with words 'unsubscribe xep-support' in the body of the message to majordomo@renderx.com from the address you are subscribed from. (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html Received on Fri Oct 5 13:50:44 2007

This archive was generated by hypermail 2.1.8 : Fri Oct 05 2007 - 13:50:45 PDT