[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: referring to images in XSL FO

Subject: Re: referring to images in XSL FO
From: "Nikolai Grigoriev" <grig@xxxxxxx>
Date: Thu, 6 Apr 2000 20:45:05 +0400
grig david image
Sebastian Rahtz asks:

> RenderX makes their .fo files so that a request for an image file looks 
> like this:
>   <fo:display-graphic text-align="centered" href="url('Images/box.jpg')"/>
> why not just
>   <fo:display-graphic text-align="centered" href="Images/box.jpg"/>

Let me explain the story.
The XSL 1999-04-21 Draft defines URI type as follows:

WD 99> 3.6.18 URI
WD 99> A sequence of characters conforming to a URI value 
WD 99> as specified in the URI specification.
WD 99>
WD 99> Ed. Note: This should refer to the proper specification.

The only applicable specification cited in the normative reference
was CSS2 one. That's why we have adopted CSS2 style of wrapping 
URIs into url() (see CSS2 4.3.4 "URL + URN = URI"). However, 
our engine supports unwrapped URIs, too. 

We will ban this strange form when we support the last draft 
(as it now contains a direct reference to RFC 2396). Until then, 
I dare suggest cleaning it up by the following rudimentary 
stylesheet:

  <xsl:template match="* |@* | comment() | text()">
    <xsl:copy>
      <xsl:apply-templates select="*|@*|comment()|text()"/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="@href [starts-with(., 'url(')] | 
                        @external-destination [starts-with(., 'url(')]">
    <xsl:copy>
      <xsl:value-of select="substring(substring(., 1, string-length-1), 5)"/>
    </xsl:copy>
  </xsl:template>


> can anyone else support this use of a "url" function? am I missing
> something in the spec which mandates it?

No, you aren't missing anything. It's our own CSS2 legacy ;-).

Regards,
Nikolai Grigoriev

RenderX
 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.