sgml documents sgml documents where does quality go where
play

SGML Documents: SGML Documents: Where Does Quality Go? Where Does - PowerPoint PPT Presentation

SGML Documents: SGML Documents: Where Does Quality Go? Where Does Quality Go? Jos Carlos Ramalho Jorge Gustavo Rocha Jos Joo Almeida Pedro Rangel Henriques Language Processing and Specification Group Computer Science Department


  1. SGML Documents: SGML Documents: Where Does Quality Go? Where Does Quality Go? José Carlos Ramalho Jorge Gustavo Rocha José João Almeida Pedro Rangel Henriques Language Processing and Specification Group Computer Science Department University of Minho Portugal

  2. What will we discuss? What will we discuss? � When information increases, when information sources increase and vary, what happens to quality? � How can we ensure/preserve quality? � What is quality (what are we talking about)? � In what contexts is quality more relevant? � Can we measure it? ... SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 2

  3. What are we doing with SGML? What are we doing with SGML? � Constructing document DBs � Publishing books on the Internet � Converting parish registers (XIII and XIV century) to SGML � Publishing from SGML DBs: Internet, CDROM, paper, … � Connecting SGML Documents to GIS SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 3

  4. Quality? Quality? Lots of Subjectivity � Quality is good. � Quality is important. � Quality is when something is good and achieves to remain good for a period of time. � Attribute, class, category (from dic.). � Specific attribute that distinguishes a person, a thing or an entity (from encycolpedia). SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 4

  5. Quality (in our context)? Quality (in our context)? → Interface → … → Data relevance → … There is a lot less → Data correctness subjectivity in this item SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 5

  6. Aims of this work Aims of this work � We want to minimize Data Incorrectness � We don’t want to change existing models � We want to extend them � In the end we want to eliminate information revision cycles SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 6

  7. SGML authoring and processing model SGML authoring and processing model Validation Process Parser Style SGML Doc. Specification OK / errors DTD Valid SGML Doc. OUTPUT Editor Editor Formatter Authoring Formatting Design Process Process Process SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 7

  8. Data (in)correctness Data (in)correctness Example 1: Portuguese History Kingdoms CD Kings ROM Wars … ??? SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 8

  9. Data (in)correctness Data (in)correctness Example 1: Portuguese History Kingdoms Kings CD ROM What went wrong? • Kings with inexistent kingdoms • Wars happening in the wrong era Wars … ??? • Characters that died before they were born • ... SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 9

  10. Data (in)correctness Data (in)correctness Example 2: Parish register (XIII and XIV century) Marriage …??? articles Family Database Death Baptism certificate certificate SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 10

  11. Data (in)correctness Data (in)correctness Example 2: Parish register (XIII and XIV century) Problems: Birth Marriage certificate articles • negative ages • death before baptism Family Database • marriages between people with age differences higher Death Baptism than 100 certificate certificate • ... SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 11

  12. What do we propose? What do we propose? � An extra validation task: – we need an additional level of abstraction separating information content from document structure. � Implemented over an external functional system (in the moment …) � Capable of expressing invariants and pre-conditions over data contents � Invisible from the user point of view SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 12

  13. How? How? � Special Comment Sections : embedding code in DTDs <!DOCTYPE king [ <!ELEMENT king -- (name,coname, bdate,…)> <!-- INV inv_king(k) = … --> � Throught an anchor to an external file <!-- INV: king.cam --> <!DOCTYPE king [ … ]> SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 13

  14. Example: kings and decrees Example: kings and decrees Inv_king(k) = <!-- INV: king.cam --> { if( k notin famous_personsDB → <!DOCTYPE king [ k ++ “ not in FPDB”), if( bdate_(k) > ddate_(k) → k ++ <!ELEMENT king -- (name, coname, bdate, ddate,decree+)> “died before he has born”), if( ddate_(k) - bdate_(k) > 120 → <!ELEMENT decree -- (date, body)> k ++ “lived more than 120”), <!ELEMENT if( !all( x ← decree_l(k) : (name,coname,bdate,ddate,date) -- bdate_(k) < date_(x) /\ (#PCDATA)> date_(x) < ddate_(k) ) → <!ELEMENT body -- (#PCDATA)> k ++ “made a decree outside ]> his life” ) }; king.dtd king.cam SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 14

  15. Example: kings and decrees Example: kings and decrees <king> ERRORS: <name>D.Dinis</name> D.Dinis must be inserted in FPDB. <coname>Farmer</coname> <bdate>1270.09.23</bdate> D.Dinis made a decree outside his <ddate>1370.09.23</ddate> life. <decree> <date>1300.07.15</date> <body>From this day only bicycles are allowed to circulate.</body> </decree> <decree> <date>1389.11.03</date> <body>McDonald’s will sell green wine instead of COCA- COLA.</decree> </king> SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 15

  16. Other Examples Other Examples � Tying an Archaeological Database to a GIS: – archaeological SGML documents have geographical coordinates. – we must ensure that every one of those coordinates is within a certain range. � City Council Elections – each voting section produces a final report with the results (an SGML document). – we must ensure that the number of votes matches the number of subscribed voters minus the absent ones. SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 16

  17. New SGML auth. and proc. model SGML auth. and proc. model New Validation Process 2/2 Validation ESIS Process 1/2 CAMILA Style Parser Specification SGML Doc. DTD2CAM OK / errors OK / errors DTD DTD Valid SGML Doc. OUTPUT Editor Editor Formatter Authoring Design Formatting Process Process Process SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 17

  18. Camila Validation Process Validation Process Camila Types Designer Invariants dtd2cam LOAD aux. Func. esis2cam DTD ESIS <king> OK / errors Data flow User … nsgmls validate Control flow </king> SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 18

  19. Camila Validation Process Validation Process Camila Types Designer Invariants dtd2cam LOAD aux. Func. TYPE esis2cam <!ELEMENT king - - (name, coname, king = name_ :name DTD bdate, ddate, decree +)> coname_ :coname ESIS bdate_ :bdate <king> OK / errors Data flow ddate_ :ddate User … dtd2cam decree_l :decree-seq nsgmls validate Control flow ; </king> ENDTYPE inv_king( k ) = true; SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 19

  20. Conclusion Conclusion � The new proposed model enables us to put some kind of data constraints associated with DTD element contents. � We can avoid many errors given by a distracted user. � We can improve information quality and reduce information revision cycle. SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 20

  21. Conclusion (cont.) Conclusion (cont.) � In the case studies we have dealed with so far we didn’t find complex invariants. � Structural correctness imposed by SGML already enforces some validation over element contents. � Most of needed invariants are very simple: domain range validation, relationship validation, ... SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 21

  22. Future Work Future Work � A simple constraint language is being studied/created to optimize the proposed system. � We are going to implement this validation scheme (with the new language) in our prototype INES (“A Document Programming Environment”). SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 22

  23. INES: Document Programming Env INES: Document Programming Env Doc X DTD “X” INES Designer Doc Y Context Rules Context Rules Style Specification Doc Z Texto “Y” Texto “X” Texto “Z” Utilizador Utilizador Utilizador A B C SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 23

  24. INES: inside INES: inside SGML text Código Scheme Errors RTF DTD Editor DTD Designer SGEN Editor Generator Context Conditions; DTD PostScript Invariants Context Editor “X” Editor Doc X Style Specification DSSSL Editor Text Errors Utilizador SGML/XML’97 - 8..11Dez - Washington - José Carlos Ramalho 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend