Re: Problems with entitys and Jade

Subject: Re: Problems with entitys and Jade
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Jan 1999 09:33:32 -0500
At 99/01/18 10:05 +0100, Joaquin Bravo wrote:
>I have got the following problem,
>I've got a SGML document
>
>......
><p>Procedimientos b&aacute;sicos</p>
>......
>
>that I want to convert a IPF working with a DSSSL and Jade
>
>:p.Procedicimientos b&aa.sicos:ep.
>
>My question is, how could I convert the entity &aacute; to a &aa. in the
>output format.

The example below shows how to use an ENTITY declaration with your desired
output, but whether you are producing SGML or XML, you will still have to
translate the encoded ampersand of the output.

Note that my test has the ENTITY declaration in the internal declaration
subset, it could, of course, be in an external declaration subset.

I hope this helps.

......... Ken

T:\FTEMP>type test.dsl
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

(declare-flow-object-class formatting-instruction
  "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")

(element p
    (sosofo-append
        (make formatting-instruction
            data: ":p.")
        (process-children)
        (make formatting-instruction
            data: ":ep.&#RE;")))

(default                       ;handle all elements not explicitly handled
    (process-children))

; end of file

T:\FTEMP>type test.sgm
<!DOCTYPE doc
[
<!ELEMENT doc - O ( p+ )>
<!ELEMENT p - - ( #PCDATA )>
<!ENTITY aacute CDATA "&aa.">
]><doc>
<p>First paragraph</p>
<p>Procedimientos b&aacute;sicos</p>
<p>Last paragraph</p>

T:\FTEMP>jade -t sgml -c p:\jade\jadecurr\catalog test.sgm >test.out

T:\FTEMP>type test.out
:p.First paragraph:ep.
:p.Procedimientos b&#38;aa.sicos:ep.
:p.Last paragraph:ep.

T:\FTEMP>jade -c p:\jade\jadecurr\catalog test.sgm

T:\FTEMP>type test.fot
<?xml version="1.0"?>
<fot>
<a name="0"/>
<a name="1"/>
<text>First paragraph</text>
<a name="2"/>
<text>Procedimientos b</text>
<text>&amp;aa.</text>
<text>sicos</text>
<a name="3"/>
<text>Last paragraph</text>
</fot>

T:\FTEMP>

--
G. Ken Holman         mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com/d/
Box 266,                                V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0            F: +1(613)489-0995
Training:   http://www.CraneSoftwrights.com/d/schedule.htm
Resources: http://www.CraneSoftwrights.com/d/resources.htm
Shareware: http://www.CraneSoftwrights.com/d/shareware.htm


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread