Subject: Re: referring to images in XSL FO From: "Nikolai Grigoriev" <grig@xxxxxxx> Date: Thu, 6 Apr 2000 20:45:05 +0400 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: referring to images in XSL FO, David Carlisle | Thread | RE: Printing XML reports, Robert C. Lyons |
Re: XHTML to HTML 4, Eric van der Vlist | Date | Re: More <xsl:when> questions!, David Carlisle |
Month |