INTRODUCCIÓN A SGML
description
Transcript of INTRODUCCIÓN A SGML
![Page 1: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/1.jpg)
INTRODUCCIÓN A SGML
Prof. Dr. Eduardo Peis Redondo
UNIVERSIDAD DE GRANADA
![Page 2: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/2.jpg)
Edición electrónica Las marcas o etiquetas en el proceso tradicional
de edición Definiciones de maquetación o markup Instrucciones para el cajista
La maquetación electrónica El procesamiento de textos WYSIWYG
Etiquetas procedimentales Troff / TeX / LaTeX / AMS-TeX
Etiquetas descriptivas Etiquetado generalizado
SCRIBE GML
![Page 3: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/3.jpg)
SGML Etiquetado descriptivo Etiquetado generalizado Un nuevo concepto de información
Contenido Presentación
Independencia de los datos Tipos de documentos
![Page 4: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/4.jpg)
antología
poema poema poema
estrofa estrofa estrofa estrofaestrofatítulo
línea
#PCDATA
línea línea línea línea línea línealínealínea
#PCDATA
#PCDATA#PCDATA
#PCDATA
#PCDATA
#PCDATA #PCDATA #PCDATA #PCDATA #PCDATA
línea
![Page 5: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/5.jpg)
ELEMENTOS<Generic Identifier>............</Generic Identifier> <nombre>...........................</nombre> <GI>.............TEXTO (#PCDATA)..............</GI> <GI>...........OTROS ELEMENTOS............</GI> <GI><GI1>...TEXTO (#PCDATA)...</GI1></GI>
<GI>.........................NADA.......................</GI> <mensaje> <autor>Eduardo Peis</autor> <texto>Este es un mensaje de inicio</texto></mensaje>
![Page 6: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/6.jpg)
<antologia>
<poema><titulo>La canción del pirata</titulo>
<estrofa>
<linea>Con diez cañones por banda</linea>
<linea>viento en popa a toda vela</linea>
<linea>no corta el mar sino vuela</linea>
<linea>un velero bergantín</linea>
</estrofa>
<estrofa>
<linea>Bajel pirata le llaman</linea>
<linea>por su bravura el temido</linea>
<linea>por todo el mar conocido</linea>
<linea>del uno a otro confín</linea>
</estrofa>
</poema>
<!-- más poemas aquí --> </antologia>
MODELO DE DOCUMENTO (document instance)
![Page 7: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/7.jpg)
<antologia>
<poema><titulo>La canción del pirata
<estrofa>
<linea>Con diez cañones por banda
<linea>viento en popa a toda vela,
<linea>no corta el mar sino vuela
<linea>un velero bergantín
<estrofa>
<linea>Bajel pirata le llaman
<linea>por su bravura el temido
<linea>en todo el mar conocido
<linea>del uno al otro confín.
<poema><titulo>La esfera rota
<!-- más poemas aquí --> </antologia>
MINIMIZACIÓN
![Page 8: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/8.jpg)
Aquí aparecería el denominado “prólogo” SGML
<!DOCTYPE antologia [<!ELEMENT antologia - - (poema+)><!ELEMENT poema - O (titulo?, estrofa+)><!ELEMENT titulo - O (#PCDATA) ><!ELEMENT estrofa - O (linea+) ><!ELEMENT linea
- O (#PCDATA) >
]>
Aquí vendría un documento etiquetado(document instance) según el anterior DTD
DOCUMENT TYPE DEFINITION (DTD)
![Page 9: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/9.jpg)
<!ELEMENT pareado O O (linea1, linea2)>
<!ELEMENT (linea | linea1 | linea2) O O (#PCDATA) >
<!ELEMENT poema - O (titulo?, (estrofa+ | pareado+ | linea+) ) >
<!ELEMENT poema - O (titulo?, (estrofa | pareado | linea)+ ) >
ACLARACIONES (DECLARATION) DE ELEMENTOS
![Page 10: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/10.jpg)
<!ELEMENT estribillo - - (#PCDATA | linea+)><!ELEMENT poema - O (titulo?,( (linea+) |
(estribillo?, (estrofa, estribillo?)+ ) )) >
USO DE PARÉNTESIS EN LOS MODELOS DE CONTENIDO
![Page 11: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/11.jpg)
<!ELEMENT (nota | variante) - - (#PCDATA)>
<!ELEMENT poema - O (titulo?, (estrofa+ | pareado+ | linea+) )+(nota | variante) >
<!ELEMENT titulo - O (#PCDATA) -(note | variant) >
<!ELEMENT (note | variant) - - (#PCDATA) -(note | variant) >
EXCEPCIONES (EXCLUSIÓN E INCLUSIÓN) AL MODELO DE CONTENIDO
![Page 12: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/12.jpg)
<!ATTLIST poema id ID
#IMPLIED estado (borrador | revisado | publicado) “borrador” >
<!ATTLIST poema id ID
#IMPLIED estado (borrador | revisado | publicado) #CURRENT
>
<poema id="P1" estado="borrador">... </poema>
ATRIBUTOS
DECLARACIONES DE ATRIBUTOS
<!ATTLIST poema
estado (borrador | revisado | publicado) #REQUIRED>
![Page 13: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/13.jpg)
<!ATTLIST poema id ID
#IMPLIED ><POEMA id="La canción del pirata">Texto del poema con identificador "La canción del pirata"</POEMA>
<POEMA id="P40">
Texto del poema con identificador "P40"</POEMA>
<POEMA>
Este poema no tiene identificador</POEMA>
ATRIBUTOS
![Page 14: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/14.jpg)
<!ELEMENT refpoema - O EMPTY><!ATTLIST refpoematarget IDREF #REQUIRED >
... el poema de Espronceda La canción del pirata <refpoema target="La canción del pirata">...
ATRIBUTO REFERENCIA
![Page 15: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/15.jpg)
<!ENTITY lcp "La canción del pirata"><texto>El poema &lcp; es de Espronceda</texto><!ENTITY Capítulo Dos SYSTEM "/mis doc~/sgml/cap2.txt">
<!ENTITY arroba “@">
<!ENTITY arroba "." >
… No era posible que a.uásemos...
<!DOCTYPE texto [<!ENTITY % elemento-epr “<!ELEMENT epr (#PCDATA)>”>%elemento-epr; ]>
ENTIDADES
![Page 16: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/16.jpg)
<!DOCTYPE mi2 SYSTEM "mi2.dtd" [
<!ENTITY atl "Acrónimos de Tres Letras">
<!ELEMENT mi.tag - - (#PCDATA)>
<!-- cualquier otra aclaración o redefinición debe ir aquí -->]
]>
<mi.2>
Este es un ejemplo de un tipo de documento mi.2 modificado que
puede contener <mi.tag>mis etiquetas especiales</mi.tag> y
referencias a mis entes normales como &atl;
</mi.2>
DECLARACION DE TIPO DE DOCUMENTO
![Page 17: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/17.jpg)
<!DOCTYPE mi.dtd [
<!-- aquí van todas las aclaraciones de mi.dtd -->...]><mi.dtd>
Este es un ejemplo de un tipo de documento que responde a mi.dtd </mi.dtd>
<!DOCTYPE mi SYSTEM "mi.dtd" ><mi.2>Este es un ejemplo (mi.2) de un tipo de documento que se corresponde con el DTD mi.dtd</mi.2>
![Page 18: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/18.jpg)
<!DOCTYPE mi.2 system “mi.2.dtd” [
<!ENTITY cap1 SYSTEM "cap1.txt">
<!ENTITY cap2 SYSTEM "cap2.txt">
<!ENTITY cap3 "-- no escritas aún --">]><mi.2><miEncabezado> ... </miEncabezado><texto>
<preliminar> ... </preliminar>
<cuerpo>
&cap1;
&cap2;
&cap3;
...
</cuerpo></texto></mi.2>
![Page 19: INTRODUCCIÓN A SGML](https://reader036.fdocumento.com/reader036/viewer/2022082507/56815d93550346895dcbad93/html5/thumbnails/19.jpg)
<!sgml “ISO 8879:1986” charset baseset “ISO 646-1983//charset International Reference Version (IRV)//ESC 2/5 4/0”...><!doctype biblioteca system “c:/sgml/biblioteca.dtd”>
DECLARACIÓN SGML