OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK: entity imagedata fileref width

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.

[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 (&#x25;) 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" 

<article class="techreport">

...produces the following html output which again includes the percent
sign in the width attribute's value of the img element...

    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <meta name="generator" content="DocBook XSL Stylesheets V1.50.0">
  <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
    <div class="article">
      <div class="titlepage">
      <div class="mediaobject">
  	<img src="image-file" width="75%">



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC