[xep-support] Using entities for images in XEP

Nikolai Grigoriev grig at renderx.com
Thu Jan 30 06:53:33 PST 2003


Geurt,

> Does XEP support constructs like:
> 
> <?xml version="1.0"?> 
> <!DOCTYPE dog [
>   <!NOTATION JPEG SYSTEM "Joint Photographic Experts Group">
>   <!ENTITY colliepic SYSTEM "lassie.jpg" NDATA JPEG>
>   <!ELEMENT dog EMPTY>
>   <!ATTLIST dog picfile ENTITY #REQUIRED>
> ]>
> <dog picfile="colliepic"/>


(It should be <dog picfile="&colliepic;"/>, shouldn't it?)

I don't know any method to use unparsed entities in XSL FO. 
Their status is quite special: an XML parser is expected
to "notify" the application when it encounters such an entity.
This "notification" can hardly be mapped to existing XSL 
data types.

> If it does, how to reference the image in this document in
> fo:external-graphic src=""?

No, it does not; but I wonder why do you need it, at all?
Won't it be simpler if you make your entity CDATA instead 
of NDATA? Something like this:

<!DOCTYPE dog [
  <!ENTITY colliepic "lassie.jpg">
  <!ELEMENT dog EMPTY>
  <!ATTLIST dog picfile ENTITY #REQUIRED>
]>

<dog picfile="&colliepic;"/>

----------
<xsl:template match="dog">
   .....
   <fo:external-graphic src="url({@picfile})"/>
  ....

Best regards,
Nikolai Grigoriev

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list