|
Subject: Re: Modifying SGML tags From: Daniel Speck <dspeck@xxxxxxxxxxxx> Date: Fri, 23 Jan 1998 13:21:43 -0500 |
Fabienne.CLAVERIE@xxxxxxxxxxxx wrote:
> Now I meet a new difficulty. I want to transform an instance conforming to
> one DTD to make it use another one. The content of each component of the DTD
> remain unchanged but the name of the tag itself must be different in order to
> correspond to a second DTD. I know that I can modify the presentation of the
> instance using my file.dsl but is it possible to change the names of the tags
> while preserving their contents?
You should take a look at the Jade documentation for the non-standard SGML flow
object classes. James provides an example script that performs an identity
SGML->SGML transformation. All you need to do is modify that example along the
lines of:
...
(default
(let* ((old-gi (gi (current-node)))
(new-gi
(case old-gi
(("ELEMENT1") "NEWELEMENT1")
(("ELEMENT2") "NEWELEMENT2")
...
(else old-gi))))
(make element
gi: new-gi
attributes: (copy-attributes))))
-dan
--
Daniel Speck e-mail: dspeck@xxxxxxxxxxxx
Research Engineer voice: +1 301.548.7818
Thomson Technology Services Group fax: +1 301.527.4094
1375 Piccard Drive, Rockville, MD 20850 WWW: www.thomtech.com
begin: vcard fn: Daniel Speck n: Speck;Daniel org: Thomson Technology Services Group adr: 1375 Piccard Drive;;Suite 250;Rockville;MD;20850;USA email;internet: dspeck@xxxxxxxxxxxx title: Research Engineer tel;work: (301) 548-7818 tel;fax: (301) 527-4094 x-mozilla-cpt: ;0 x-mozilla-html: TRUE version: 2.1 end: vcard
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Modifying SGML tags, Fabienne . CLAVERIE | Thread | Testing on attribute values in nest, Tomas Eriksson |
| Re: Quirks of the printing industry, Daniel Speck | Date | Re: DD: Suggestions for Coherency, Tony Graham |
| Month |