XML_spec - Version 1.2 October 18 COSC 3311 Software Design Report 2 XML Translation Due Thursday November 4 7:00pm Work in groups of size 1 or 2 1

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Version 1.2 – October 18 COSC 3311 Software Design Report 2: XML Translation Due: Thursday, November 4, 7:00pm Work in groups of size 1 or 2 1 Given The report2 Application sub-directory contains the following files. all_translations.e and translator.e , which should not be changed. The file FlexOrPs.header – a Postscript file that contains the Postscript definitions that you need to make your output a proper Postscript file. An example input file example-input.xml showing some of the components in the XML files translated by the system you are to develop. An example output file example-output.ps shows a prototype of the Postscript translation of example-input.xml . Look at lines 548 to 624, the earlier lines are a copy of FlexOrPs.header . The output was manually translated and, as a consequence, is not an exact translation as specified in the specification – display line lengths were not calculated, they were estimated instead – but the output is close enough to understand what is required. Comments, also added manually, describe the translation. The output file can be displayed with ghostview on Prism. 2 Input and output structures 2.1 Input file structure The input file is a tagged ASCII file. The tags are a small subset of the XML/HTML tags used in web documents. The input files have the following EBNF description. Legend: [ A ] – optional A, can have or not have [ A , B ] – optional choice: can have A or B or neither +[ . .. ] – zero or more iterations of the choice – can have a different choice for each iteration ( A ) – must have an A ( A , B) – must have one of A or B +( ... ) – one or more iterations of the choices – can have a different choice for each iteration A B – have an A followed by a B; there is a space between the A and B The input file, viewed as a sequence of ASCII characters, has the following structure. File ::= +[ Line ] Eof ; Line ::= [ [ Space ] Tag [ Text ] , Text ] Eol ; Tag ::= ‘<’ TagName ‘>’ ; Text ::= +( Word , Space) ; Word ::= +( GraphicCharacter ) ; Space ::= +( ‘ ’ ) ; GraphicCharacter ::= Any ASCII character that puts ink on paper -- no whitespace or control characters. TagName ::= ( “SECTION” , “/SECTION” , “P”, “UL”, “LI”, “/UL”) ; The input file, viewed as a sequence of tagged components, has the following structure, which uses some of the previous rules.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
October 18 3311 Software Design Report 2 Spec – Version 1.2 - 2 of 4 - File ::= +[ Section ] Eof ; Section ::= “<SECTION>” SectionHeader “</SECTION>” +[ Text , TaggedComponent ] ; SectionHeader ::= +[ Text ] TaggedComponent ::= +( Paragraph , BulletedList ) ; Paragraph ::= “<P>” [ Text ] ; BulletedList ::= “<UL>” +[ Text , TaggedComponent , ListItem ] “</UL>” ; ListItem ::= “<LI>” +[ Text , TaggedComponent ] ;
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/14/2012 for the course CSE 3214 taught by Professor Ross during the Winter '12 term at York University.

Page1 / 4

XML_spec - Version 1.2 October 18 COSC 3311 Software Design Report 2 XML Translation Due Thursday November 4 7:00pm Work in groups of size 1 or 2 1

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online