This work is licensed under a CC |
While XML is very useful for representing and manipulating structured data, the question remains where these structures come from. They are usually some kind of encoding for a conceptual model, but there is no established and universally accepted way of how to connect the modeling world with XML markup. Some of the challenges and approaches to XML and modeling will be presented in this lecture. The goal of this lecture is to raise awareness for the current gap between models and markup, and for practical approaches how to bridge that gap.
conceptual modeling layer
Layer | Technology | |
---|---|---|
database world (SQL) | XML related | |
conceptual | Entity Relationship Diagrams | ??? |
logical | DDL (CREATE TABLE … )DML ( INSERT INTO … ) |
schemas XQuery |
physical | table space | XML |
A simplification
An abstraction
A template
modelin (more) natural language:
This model is a model of the Golden Gate Bridge and it required about 300 pieces …2
What is this? A center for ants? How can we be expected to teach children to learn how to read … if they can't even fit inside the building?
Derek, this is just a small …
I don't wanna hear your excuses! The building has to be at least … three times bigger than this!
relevantattributes and omitting the rest
patterns1)
Patterns are models that are sufficiently general, adaptable, and worthy of imitation that we can reuse them.(From: Glushko, Robert J. and McGrath, Tim: Document Engineering, p. 90). Identifying such patterns is a modeling task!
Google; a wiki; your blogging tool | Application | (1) |
HTTP, FTP | (3) | |
TCP, UDP | Transport | (2) |
IP | Network | (4) |
Ethernet, 802.11 | MAC (Medium Access Control) | |
NRZ, DSSS, 16QAM | Physical | |
Copper wire, fiber, RF |
UML | (2) |
Java | (4) |
Virtual machine | |
C | (1) |
Assembler Language | |
Machine Code | |
VHDL | |
Logic Gates | (3) |
My Bicycle | Memory, social implications … |
A Bicycle | Prior interpretative knowledge |
Circles, lines and a diamond shape, colored | Form vision |
Electrical pulses | Neural transmission |
A concentration of Rhodopsin, Opsin, cGMP, … | Retina: Rods & Cones |
A bunch of sunrays, reflected | Pupil, eye lens |
Shake hands | Conscious action |
… all the way down to … | |
Converting some ATP | Mitochondrions |
Multiple Views of Data:1
gooddata modeling?
think about working with a tree rather than working with a text file– so let's draw a tree!
educationor
experience: This information can be retrieved from the structure and again added to a specific view when being generated.
<!ELEMENT résumé (date, person, education*, experience*, essay, skill*) > <!ELEMENT date (day?, month, year) > <!ELEMENT person (name, address) > <!ELEMENT education (degree?, institution, startDate, endDate) > <!ELEMENT experience (task*, company, startDate, endDate) > <!ELEMENT essay (#PCDATA) > <!ELEMENT skill (#PCDATA) > <!ATTLIST skill proficiency (low | medium | high) #IMPLIED >
&
connector (not part of XML)proficiency
readily can be modeled as an attribute; its value space is a good example for an enumeration<!ELEMENT name (first+, middle*, last+) > <!ELEMENT address (street+, city, zip*, state?, country) > <!ELEMENT startDate (date) > <!ELEMENT endDate (date) >
<person> <name> <first>Felix</first> <last>Michel</last>
<education> <degree>Swiss Matura</degree> <institution> <fullName>Literargymnasium Rämibühl</fullName>
<experience> <task>Software Engineering</task> <task>Network Deployment</task> <company> <fullName>tegoro solutions</fullName>
<skill proficiency="high">C</skill> <skill proficiency="high">XML Schema</skill> <skill proficiency="low">English</skill>
<essay> I entered the Literargymnasium Rämibühl in 1994 where I obtained my Swiss Matura in January 2001. Starting from fall 2001 I have been studying Electrical Engineering at the ETHZ, where I learned C and XML Schema. After my final exams I stayed with tegoro solutions in Basel for an internship before I had the opportunity to do my Master Thesis at UC Berkeley. I hope that I will be able to improve my english skills while staying at iSchool. </essay>
ID | Name | Study | Department |
---|---|---|---|
24536133 | Bob | Computer Science | College of Engineering |
34125004 | Alice | Document Engineering | School of Information |
11042019 | Zlatan | Computer Science | College of Engineering |
Study | Department |
---|---|
Computer Science | College of Engineering |
Document Engineering | School of Information |
ID | Name | Study |
---|---|---|
24536133 | Bob | Computer Science |
34125004 | Alice | Document Engineering |
11042019 | Zlatan | Computer Science |
|
connector, choice model group)informal models may use any notation
Determine … | Phase | Question | Example | Action | |
---|---|---|---|---|---|
1. | Entities | Inventory | What's there? | person, company | Sketch boxes |
2. | Reusable Objects | Analysis | address, date | Perhaps include some model libraries (UBL) | |
3. | Reusable Tags | Markup design | What do we need? | lists, hyperlinks, headings | Perhaps include some schemas (XHTML) |
4. | Relations | Assembly | What's the connection? | has-a, contains, references | Draw arcs and arrows |
<!ENTITY % date "(day?, month, year)" > <!ENTITY % address "(street, street?, city, zip*, state?, country)" >
<!ELEMENT startDate %date; > <!ELEMENT endDate %date; >
<!ELEMENT institution (fullName, address) > <!ATTLIST institution id ID #REQUIRED >
<!ELEMENT education (degree?, startDate, endDate) > <!ATTLIST education id ID #REQUIRED ref IDREF #IMPLIED >
<!ELEMENT skills (skill*) > <!ELEMENT skill (#PCDATA) > <!ATTLIST skill id ID #REQUIRED proficiency (low | medium | high) #IMPLIED origin IDREF #IMPLIED >
<education id="edu1" ref="inst1"> <degree id="degMat">Swiss Matura</degree> <startDate> <day>22</day> <month>August</month> <year>1994</year> </startDate>
<essay> After having obtained my <link ref="degMat"/> from <link ref="inst1"/>, I have been studying Electrical Engineering at the <link ref="inst2"/>, where I learned <link ref="sklC"/> and <link ref="sklXSD"/>. After my final exams I stayed with <link ref="comp1"/> for an internship before I had the opportunity to do my Master Thesis at <link ref="inst3"/>. I hope that I will be able to improve my <link ref="sklEN"/> skills while staying at <link ref="inst3"/>. </essay>
<xsl:template match="training/education/degree" mode="info"> <div class="infoBox"> <xsl:attribute name="id" select="@id"></xsl:attribute> <h3><xsl:apply-templates select="."></xsl:apply-templates></h3> Obtained from <xsl:variable name="REF" select="../@ref" /> <xsl:value-of select="//*[@id=$REF]/fullName" /> </div> </xsl:template>
View | XSLT | HTML |
---|---|---|
Tabular | tabular.xsl | tabular.html |
Textual | narrative.xsl | narrative.html |