You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by gi...@postino.it on 2002/08/06 22:12:45 UTC

"dynamyc" link (newbie Question)

in Elliott Rusty Harold's
http://www.ibiblio.org/xml/books/bible2/chapters/ch18.

I find the following syntax for the link in XSL_FO

html#d1e4822<fo:block> Be sure to visit the
   <fo:basic-link
     external-
destination="http://www.cafeconleche.org/">
      Cafe con Leche Web site!
   </fo:basic-link>
</fo:block>

But in this case I see 
that "http://www.cafeconleche.org/
isn't taken from an XML file that can change but is 
fixed
But if the link is in my XML file and I want to take 
it from this XML?

Thanks 
Gianni Rubagotti 
EDW-International
http://www.edw-international.com/






----
Questo messaggio arriva da Postino, il (mitico) servizio di posta di Punto
(http://www.punto.it)
-----
Punto Internet Gratis: la connessione gratuita a Internet realizzata da
Punto con Elitel, senza costi di abbonamento o di attivazione e senza
vincoli!
(http://www.punto.it/free_internet.php)
-----

RE: "dynamyc" link (newbie Question)

Posted by Roland Neilands <rn...@pulsemining.com.au>.
Gianni,

> But in this case I see
> that "http://www.cafeconleche.org/
> isn't taken from an XML file that can change but is
> fixed
> But if the link is in my XML file and I want to take
> it from this XML?

There are plenty of examples in the docs/examples subdirectories, have a
look through them (especially docs/examples/fo/link.fo)

You have to use a variable, and if it is not a mandatory field, don't create
the link at all. This works for <URL>http://www.cafeconleche.org/</URL>

        <xsl:if test="normalize-space(URL)">
          <fo:block>
            <xsl:variable name="link">
              <xsl:value-of select="URL"/>
            </xsl:variable>
            <fo:basic-link color="blue" external-destination="{$link}">
              <xsl:value-of select="$link"/>
            </fo:basic-link>
          </fo:block>
        </xsl:if>

Cheers,
Roland