[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK: entity imagedata fileref width
On Tuesday 30 April 2002 08:27, Steffen Maier wrote: > Hello Lorenzo, > > On Tue, 30 Apr 2002, Lorenzo Delana wrote: > > but this is unparsed by saxon, > > > > <!ENTITY figure '<mediaobject><imageobject><imagedata > > fileref="image-file" width="75%"/></imageobject></mediaobject>'> > > > > cause I used % in width attrib; how can I solve this? > > Interesting problem. Never came across this one although I have to admit > that sooner or later it's supposed to happen. > > As you already noticed the percent sign is not allowed in entity values > because it starts parameter entity references. > > [http://www.w3.org/TR/2000/REC-xml-20001006#NT-EntityValue]: > [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | > "'" ([^%&'] | PEReference | Reference)* "'" > > According to [http://www.w3.org/TR/2000/REC-xml-20001006#entproc] I tried > to use a character entity reference (%) to replace the percent sign > and it worked with saxon 6.5.2. > > The following example document... > > <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" > "/home/maiersn/share/sgml/docbkx412/docbookx.dtd" [ > <!ENTITY figure '<mediaobject><imageobject><imagedata fileref="image-file" > width="75%"/></imageobject></mediaobject>'> > ]> > > <article class="techreport"> > &figure; > </article> > > ...produces the following html output which again includes the percent > sign in the width attribute's value of the img element... > good, tnx A common behaviour of alternative attributes for imagedata width with percent specification, is to rely on docbook implementation, in my case infact, I solved with useing of 'scale' attrib that doesn't need the percent sign. > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=ISO-8859-1"> <title></title> > <meta name="generator" content="DocBook XSL Stylesheets V1.50.0"> > </head> > <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" > alink="#0000FF"> <div class="article"> > <div class="titlepage"> > <hr> > </div> > <div class="mediaobject"> > <img src="image-file" width="75%"> > </div> > </div> > </body> > </html> > > HTH, > Steffen.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC