|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Pictures as hotlinksHello, I've got a little problem here with big pictures (mostly in <figure>-tags) in html-files. Since I use a cms for publishing my docs, there is only a restricted width for pictures so I want to use smaller ones and make them to hotlinks to the original version. Is there a possibility to work around the limitation for xlinks which as much as I know only work for inline-elements? Thanks in advance for any reply! Benno |
||||||||||||||||||||
|
|
RE: Pictures as hotlinksWhat about something like this
construct:
<figure>
<title></title> <ulink url="big_image.png"><inlinemediaobject><imageobject><imagedata fileref="small_image.png"/></imageobject></inlinemediaobject></ulink> </figure>
*************************
Rob Cavicchio Principal Technical Writer EMC Captiva EMC Corporation 10145 Pacific Heights Boulevard, 6th Floor San Diego, CA 92121-4234 P: (858) 320-1208 F: (858) 320-1010 E: Cavicchio_Rob@... The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC.
|
||||||||||||||||||||
|
|
Antwort: [docbook-apps] RE: Pictures as hotlinksThanks, but unfortunately this doesn't work since <inlinemediaobject> is not allowed in <figure>. The problem is a bit more complicated because I've got a reference for pdf and one for html, but only html should have this link to a bigger picture. Something like this: <figure> <title>blabb</title> <mediaobject> <imageobject role="fo"> <imagedata contentdepth="100%" fileref="Pictures/image_big.png" scalefit="1" width="100%" /> </imageobject> <imageobject role="html" xlink:href="image_big.png"> <imagedata fileref="Pictures/image_thumb.png" /> </imageobject> </mediaobject> </figure> The xlink-attribute of course does not work here. But it should ;-). Regards, Benno
What about something like this construct: <figure> <title></title> <ulink url="big_image.png"><inlinemediaobject><imageobject><imagedata fileref="small_image.png"/></imageobject></inlinemediaobject></ulink> </figure> ************************* Rob Cavicchio Principal Technical Writer EMC Captiva EMC Corporation 10145 Pacific Heights Boulevard, 6th Floor San Diego, CA 92121-4234 P: (858) 320-1208 F: (858) 320-1010 E: Cavicchio_Rob@... The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC. From: benno.wolf@... [mailto:benno.wolf@...] Sent: Tuesday, September 15, 2009 3:11 AM To: docbook-apps@... Subject: Pictures as hotlinks Hello, I've got a little problem here with big pictures (mostly in <figure>-tags) in html-files. Since I use a cms for publishing my docs, there is only a restricted width for pictures so I want to use smaller ones and make them to hotlinks to the original version. Is there a possibility to work around the limitation for xlinks which as much as I know only work for inline-elements? Thanks in advance for any reply! Benno |
||||||||||||||||||||
|
|
Re: Antwort: [docbook-apps] RE: Pictures as hotlinksHi,
I could get it to work by customizing the template
named 'process.image' from html/graphics.xsl. Unfortunately, that is a
huge template, so customizing means copying the whole thing just to change a
couple of lines. But it does work.
The 'process.image' template is called with
imagedata as the context node. So if you put the xlink:href on imagedata,
the customization is easier. In 'process.image', replace (in two
places):
<xsl:copy-of select="$img"/>
with:
<xsl:call-template
name="simple.xlink">
<xsl:with-param name="content"> <xsl:copy-of select="$img"/> </xsl:with-param> </xsl:call-template> Any imagedata elements without an xlink:href will
just pass through.
|
||||||||||||||||||||
|
|
Antwort: Re: [docbook-apps] Antwort: [docbook-apps] RE: Pictures as hotlinksThank you very much, this works fine. The only thing now: how can I modify the Schema so I get no validation error because of the href within imagedata? Or, probably I should leave that as it is ... Thanks again & best regards, Benno
Hi, I could get it to work by customizing the template named 'process.image' from html/graphics.xsl. Unfortunately, that is a huge template, so customizing means copying the whole thing just to change a couple of lines. But it does work. The 'process.image' template is called with imagedata as the context node. So if you put the xlink:href on imagedata, the customization is easier. In 'process.image', replace (in two places): <xsl:copy-of select="$img"/> with: <xsl:call-template name="simple.xlink"> <xsl:with-param name="content"> <xsl:copy-of select="$img"/> </xsl:with-param> </xsl:call-template> Any imagedata elements without an xlink:href will just pass through. Bob Stayton Sagehill Enterprises bobs@... ----- Original Message ----- From: benno.wolf@... To: Cavicchio_Rob@... Cc: docbook-apps@... Sent: Monday, September 21, 2009 8:45 AM Subject: [docbook-apps] Antwort: [docbook-apps] RE: Pictures as hotlinks Thanks, but unfortunately this doesn't work since <inlinemediaobject> is not allowed in <figure>. The problem is a bit more complicated because I've got a reference for pdf and one for html, but only html should have this link to a bigger picture. Something like this: <figure> <title>blabb</title> <mediaobject> <imageobject role="fo"> <imagedata contentdepth="100%" fileref="Pictures/image_big.png" scalefit="1" width="100%" /> </imageobject> <imageobject role="html" xlink:href="image_big.png"> <imagedata fileref="Pictures/image_thumb.png" /> </imageobject> </mediaobject> </figure> The xlink-attribute of course does not work here. But it should ;-). Regards, Benno
What about something like this construct: <figure> <title></title> <ulink url="big_image.png"><inlinemediaobject><imageobject><imagedata fileref="small_image.png"/></imageobject></inlinemediaobject></ulink> </figure> ************************* Rob Cavicchio Principal Technical Writer EMC Captiva EMC Corporation 10145 Pacific Heights Boulevard, 6th Floor San Diego, CA 92121-4234 P: (858) 320-1208 F: (858) 320-1010 E: Cavicchio_Rob@... The opinions expressed here are my personal opinions. Content published here is not read or approved in advance by EMC and does not necessarily reflect the views and opinions of EMC. From: benno.wolf@... [mailto:benno.wolf@...] Sent: Tuesday, September 15, 2009 3:11 AM To: docbook-apps@... Subject: Pictures as hotlinks Hello, I've got a little problem here with big pictures (mostly in <figure>-tags) in html-files. Since I use a cms for publishing my docs, there is only a restricted width for pictures so I want to use smaller ones and make them to hotlinks to the original version. Is there a possibility to work around the limitation for xlinks which as much as I know only work for inline-elements? Thanks in advance for any reply! Benno |
| Free embeddable forum powered by Nabble | Forum Help |