WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Cross references in html ?

Cross references in html ?

by FredT :: Rate this Message:

| View in Thread

Hi all, this is my first message here (from southern France) - I've started
testing Daisy and i really like it, it seems to address our need to have a
complete, secured, multilingual and versionned documentation.

So,my first question is : how can I have cross references in the html, non-book
version?

Let's say that I'm dealing with a legal text, so I have a Doc, title "General
Provisions", with a Field ArticleNumber="4", with this kind of content:

"When the Customer complies with Article 95, then he shall benefit Article 34-2"

Which I'd like to turn in

"When the Customer complies with (Article 95 [About Poverty]), then he shall
benefit (Article 34-2 [Credit conditions - Refusal])".

Where:
- I have a Document with title "About Poverty" and $ArticleNumber = 95,
- I have a Document with title "Credit conditions", $ArticleNumber = 34, with
some ยง2 for which I defined an ID "Refusal"

The trick here is that Article Number may change... our lawyers love tricks. So
when Art 95 turns to be Art 97, the cross refs should stay OK.

It seems that this can be achieved in PDF, but what did I miss in the html
version? I tried to play with
daisywikidata/resources/skins/default/document-styling/html/Article.xsl and
could change the way the link is rendered with

  <xsl:template match="span[@class='crossreference']" mode="PartContent">
    <xsl:variable name="crossRefType" select="string(@crossRefType)"/>
    <xsl:choose>
      <xsl:when test="$crossRefType = 'invalid'">
        [invalid cross reference]
      </xsl:when>
      <xsl:otherwise>
        <xsl:variable name="crossRefText" select="string(@crossRefTarget)"/>
        <a href="{@crossRefTarget}">(Link to <xsl:value-of
select="@crossRefTarget"/>)</a>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

but I just get a link to 99-MYNS (99 is the internal number for my Article 95)

- how can I get the title, parts, fields and IDs from this 99-MYNS ?


Thanks in advance for your help !

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

 « Return to Thread: Cross references in html ?