xsl-list
[Top] [All Lists]

RE: adding unparsed entities

2004-06-08 23:29:15
Hi,

I am transforming a document to TEI.2. TEI.2 requires that graphics
(such as JPEGS) be included using unparsed entities. 

I assume there is no way to really add an unparsed entity to a result
tree (except by using escaping, which I don't like to do). Am 
I correct?
Has anyone come across this problem?

You could use extensions offered by some processors, e.g. Saxon gives you

  <saxon:doctype xsl:extension-element-prefixes="saxon">
    <dtd:doctype name="booklist">
      <dtd:entity name="cover" system="cover.gif" notation="GIF"/>
      <dtd:notation name="GIF" system="http://gif.org/"/>
    </dtd:doctype>
  </saxon:doctype>

or you could write out the entity declarations as processing instructions and 
use your own serializer to turn them into entity declarations in the internal 
subset.

Cheers,

Jarno - Painbastard: Damned To Suffer
<Prev in Thread] Current Thread [Next in Thread>