Re: Access and Display to Attlist

Subject: Re: Access and Display to Attlist
From: Daniel Speck <dspeck@xxxxxxxxxxxx>
Date: Tue, 04 Nov 1997 11:52:29 -0500
Fabienne.CLAVERIE@xxxxxxxxxxxx wrote:
> I need to access the attributes of one element of a dtd and to realize
> different operation. This is equivalent to something like :
> <!element bloc2 - o ((titre?,#PCDATA)|bloc3)+>
>   <!ATTLIST bloc2 TYPE (a|b|c)  #REQUIRED>
> I don't know how to write in my doc.dsl
> if bloc2=a something...
> if bloc2=b something..
> if bloc2=c..............
> "Something" could be, display a special content,  insert a literal or replace
> completely the element bloc2 by another text in function of the value of the
> attribute.

How about:

(element BLOC2
  (case (attribute-string "type")
    (("a") (do-something))
    (("b") (do-something-else))
    (("c") (do-something-else-else))
    (else (report-error))))

where (do-something) might be:

  (literal "Inserted Literal: ")

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:

 DSSSList info and archive:

Current Thread