; ; Script Omnimark para gerar uma página HTML com os arqueositios agrupados ; por Concelho e links para cada uma das páginas individuais dos arqsits ; e cruzar esta informação com o glossário enriquecendo os dois. ; Versão 0.1 - jcr - 21.04.98 ; DOWN-TRANSLATE global stream area-stream variable initial-size 0 global stream thesaurus variable initial-size 0 global stream cidenti global stream concelho global counter arqind INITIAL {1} global stream farq global stream termlist variable initial-size 0 global counter cliga ELEMENT #IMPLIED SUPPRESS DOCUMENT START do sgml-parse document creating dtds key "glossary" scan file "gloss.dtd" suppress done do sgml-parse instance with dtds key "glossary" scan file "gloss.sgm" using group gloss do output "%c" done done ; ========================== group gloss ; ========================== ELEMENT termo set new thesaurus to "%c" suppress ; ========================== group arqs ; ========================== ELEMENT arqsits OUTPUT "%c" ELEMENT arqelem set cliga to 1 OPEN farq AS FILE "ARQS/arq%d(arqind).html" USING OUTPUT AS farq OUTPUT "

%c


" CLOSE farq REPEAT OVER termlist SET REFERENT termlist TO "%g(cidenti) AGAIN INCREMENT arqind DISCARD termlist ELEMENT identi SET cidenti TO "%c" OUTPUT "

%n

Identificação:

%g(cidenti)" ELEMENT concel SET concelho TO "%sc" OUTPUT "

%n

Concelho:

%g(concelho)" DO WHEN !(area-stream has key concelho) NEW area-stream key concelho DONE REOPEN area-stream key concelho as buffer PUT area-stream key concelho "
  • %g(cidenti)%n" CLOSE area-stream key concelho ELEMENT quadro OUTPUT "

    %n

    Quadro:

    %n%c" ELEMENT desarq OUTPUT "

    %n

    Descrição:

    %n%c" ELEMENT liga local stream lstemp set lstemp to "%c" OUTPUT "%g(lstemp)" SET NEW termlist TO cidenti INCREMENT cliga DOCUMENT-END local stream alist REPEAT OVER area-stream OUTPUT "

    Entrys of '" || key of area-stream || "':

    %n%n" again REPEAT OVER thesaurus AGAIN