XML_design-doc

XML_design-doc - Version 1.0 November 4 COSC 3311 Software...

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

View Full Document Right Arrow Icon
Version 1.0 – November 4 COSC 3311 Software Design Report 2: XML Translation On the Design of the System Gunnar Gotshalks 1 Introduction This document describes the design work and testing done in completing the tasks as specified in the specification “Report 2: XML Translation”, which can be found at the following URL by following the link for the report 2 specification in the September 16 bulletin. http://www.cs.yorku.ca/course_archive/2004-05/F/3311/ The initial program text that was given to students in the following file in the course directory. prism:/cs/dept/course/2004-05/F/3311/report2.tar 2 XML-file representation classes Report 1 specification had a concluding section that described that the classes TERM and VARIABLE were determined from the grammar rules describing a polynomial. In the specification for Report 2 we are given two grammars. One grammar describes the structure of the input file that represents XML files for the purposes of the Report. Another grammar describes the tagged structure of an XML file. At first glance it appears that the second grammar most closely represents the inherent structure of an XML file but on closer examination objects in the first grammar appear in the second grammar. It was decided to use both grammars in determining the classes to be developed The following are the candidate classes for representing an XML structure. File, Section, SectionHeader, TaggedComponent, Paragraph, BulletedList, ListItem, Text, Word, Space, GraphicCharacter, Tag, TagName, Line 2.1 The classes to keep The following list shows the sub-list of candidate classes that it was decided to keep. 1. File – renamed as XML_file – represents the sequence of sections in an XML file; it is the root of the internal representation. 2. Section – represents the list of components in a section, including the section header. 3. TaggedComponent – represents the parent type for all tagged components; i.e. components that begin with a tag such as a bulleted list. 4. Paragraph – represents the list of components in a paragraph 5. BulletedList – represents the list of components in bulleted list 6. ListItem – represents the list of components in a list item within a bulleted list. 7. Text – Represents the parent type of user data in an XML file such as Space and Word 8. Word – Represents a word in the user data. 9. Space – Represents spacing in the user data. 2.2 The classes to reject The following shows the sub-list of candidate classes that it was decided to reject. 1. SectionHeader – is replaced by Text, no other attributes are needed at this time. 2. Tag – Each tag with a name not beginning with “/” corresponds to a class derived from a grammar rule that has a start tag as their first component. The objects of interest are not the tags themselves but the objects that are denoted by the presence of a tag. The end tags, such as, </SECTION> and
Background image of page 1

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

View Full DocumentRight Arrow Icon
Version 1.0 – November 4 2 of 7 </UL>, are represented by the termination of the list of the components that appear, in the
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 / 7

XML_design-doc - Version 1.0 November 4 COSC 3311 Software...

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