ATL TRANSFORMATION EXAMPLE

Relevanta dokument
Isolda Purchase - EDI

Uttagning för D21E och H21E

Swedish adaptation of ISO TC 211 Quality principles. Erik Stenborg

Rastercell. Digital Rastrering. AM & FM Raster. Rastercell. AM & FM Raster. Sasan Gooran (VT 2007) Rastrering. Rastercell. Konventionellt, AM

Övning 1 - Abstrakta datatyper


Documentation SN 3102

Graphs (chapter 14) 1

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

FÖRBERED UNDERLAG FÖR BEDÖMNING SÅ HÄR

Beijer Electronics AB 2000, MA00336A,

Manhour analys EASA STI #17214

Här följer instruktioner och en mall för din vetenskapliga rapport, Examensarbete 30 hp på läkarprogrammet (LÄA110)

SVENSK STANDARD SS-EN ISO 19108:2005/AC:2015

PORTSECURITY IN SÖLVESBORG

Projektmodell med kunskapshantering anpassad för Svenska Mässan Koncernen

Preschool Kindergarten

Isometries of the plane

2.1 Installation of driver using Internet Installation of driver from disk... 3

Scalable Dynamic Analysis of Binary Code

12.6 Heat equation, Wave equation

Anvisningar för ämnesansvariga vid LTV-fakulteten

Övning 1. Abstrakta datatyper. 1. Stacken. class Stack: """A representation of a last-in-first-out (LIFO) stack of objects."""

SVENSK STANDARD SS

Webbregistrering pa kurs och termin

Oförstörande provning (NDT) i Del M Subpart F/Del 145-organisationer

RADIATION TEST REPORT. GAMMA: 30.45k, 59.05k, 118.8k/TM1019 Condition D

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

SVENSK STANDARD SS-ISO :2010/Amd 1:2010

Questionnaire for visa applicants Appendix A

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

SkillGuide. Bruksanvisning. Svenska

Materialplanering och styrning på grundnivå. 7,5 högskolepoäng

Files in the Classification Directory

Komponenter Removed Serviceable

LARS. Ett e-bokningssystem för skoldatorer.

TDDC74 FÖRELÄSNING 9 ANDERS MÄRAK LEFFLER IDA/HCS

Semantic and Physical Modeling and Simulation of Multi-Domain Energy Systems: Gas Turbines and Electrical Power Networks

How to format the different elements of a page in the CMS :

Annonsformat desktop. Startsida / områdesstartsidor. Artikel/nyhets-sidor. 1. Toppbanner, format 1050x180 pxl. Format 1060x180 px + 250x240 pxl.

Quicksort. Koffman & Wolfgang kapitel 8, avsnitt 9

Webbreg öppen: 26/ /

SAMMANFATTNING AV SUMMARY OF

Module 6: Integrals and applications

Social innovation - en potentiell möjliggörare

SWESIAQ Swedish Chapter of International Society of Indoor Air Quality and Climate

Eternal Employment Financial Feasibility Study

This exam consists of four problems. The maximum sum of points is 20. The marks 3, 4 and 5 require a minimum

Support for Artist Residencies

Styrteknik: Binära tal, talsystem och koder D3:1

55R Kia Carens 2013»

P650 - Takscreen. Installationsguide EN

Webbtillgänglighet. Tillgänglighet på webben. Hörselskadades behov. Synskadades behov. Kognitivt funktionshindrades behov. Rörelsehindrades behov

Goals for third cycle studies according to the Higher Education Ordinance of Sweden (Sw. "Högskoleförordningen")

Information technology Open Document Format for Office Applications (OpenDocument) v1.0 (ISO/IEC 26300:2006, IDT) SWEDISH STANDARDS INSTITUTE

DVG C01 TENTAMEN I PROGRAMSPRÅK PROGRAMMING LANGUAGES EXAMINATION :15-13: 15

Vad kännetecknar en god klass. Vad kännetecknar en god klass. F12 Nested & Inner Classes

ANSÖKAN OM INRÄTTANDE AV EXTERNT FINANSIERAT DOKTORANDPROJEKT ANNAN ARBETSGIVARE ÄN GÖTEBORGS UNIVERSITET

Support Manual HoistLocatel Electronic Locks

EXTERNAL ASSESSMENT SAMPLE TASKS SWEDISH BREAKTHROUGH LSPSWEB/0Y09

Seminarium om CCL och SMS Förordning (EU) nr 965/2012 OPS-CAT/Flygplan EASA-OPS

Senaste trenderna från testforskningen: Passar de industrin? Robert Feldt,

PORTSECURITY IN SÖLVESBORG

Anders Persson Philosophy of Science (FOR001F) Response rate = 0 % Survey Results. Relative Frequencies of answers Std. Dev.

Övning 5 ETS052 Datorkommuniktion Routing och Networking

Användarhandbok. MHL to HDMI Adapter IM750

Design Service Goal. Hantering av demonterbara delar som ingår i Fatigue Critical Baseline Structure List. Presentatör

Kursplan. JP1040 Japanska III: Språkfärdighet. 15 högskolepoäng, Grundnivå 1. Japanese III: Language Proficiency

Välkommen in på min hemsida. Som företagsnamnet antyder så sysslar jag med teknisk design och konstruktion i 3D cad.

Translation Changes in Swedish EBSCOhost Interface

Viktig information för transmittrar med option /A1 Gold-Plated Diaphragm

TAGFAK, semicolon separated

55R Volvo XC » Volvo XC » Volvo S » Volvo V » Volvo XC » Volvo V »

Par m 328 feet. Lång höger sväng. Korgen står placerad i en skogsglänta OB-linje på vänster sida.

Examensarbete Introduk)on - Slutsatser Anne Håkansson annehak@kth.se Studierektor Examensarbeten ICT-skolan, KTH

Syns du, finns du? Examensarbete 15 hp kandidatnivå Medie- och kommunikationsvetenskap

FOI MEMO. Jonas Hallberg FOI Memo 5253

Matthew Thurley Industriell bildanalys (E0005E) Response rate = 65 %

Writing with context. Att skriva med sammanhang

Resultat av den utökade första planeringsövningen inför RRC september 2005

Det finns en handledning till kortet på hemsidan. AVR STK500.

Studieteknik för universitetet 2. Books in English and annat på svenska

En bild säger mer än tusen ord?

ANSÖKAN OM INRÄTTANDE AV EXTERNT FINANSIERAT DOKTORANDPROJEKT ANNAN ARBETSGIVARE ÄN GÖTEBORGS UNIVERSITET

VHDL Basics. Component model Code model Entity Architecture Identifiers and objects Operations for relations. Bengt Oelmann -- copyright

Protokoll Föreningsutskottet

Authentication Context QC Statement. Stefan Santesson, 3xA Security AB

Utrustning för underhåll av vintervägar och trafikområden Insamling och överföring av data Del 1: Insamling av data i fordon

Libers språklåda i engelska Grab n go lessons

Family appendix for applicants Appendix D

Every visitor coming to the this website can subscribe for the newsletter by entering respective address and desired city.

!"#$ $ % &'(')*+* +, 012/( 3-0$ (4 (5 /& 0- -(4 (5 /& 06/7*)).)*+* 8 09

UML use cases. Mikael Söderström Institutionen för informatik Umeå universitet

HANTERING AV UPS CX

What Is Hyper-Threading and How Does It Improve Performance

Grafer, traversering. Koffman & Wolfgang kapitel 10, avsnitt 4

LULEÅ TEKNISKA UNIVERSITET

PRESTANDADEKLARATION. Nr 0015 SV

Transkript:

1. Transfrmatin Example 1.1. Example: BibTeXML DcBk The BibTeXML t DcBk example describes a transfrmatin f a BibTeXML mdel t a DcBk cmpsed dcument. BibTeXML [1] is an XML-based frmat fr the BibTeX bibligraphic tl. DcBk [2], as fr it, is an XML-based frmat fr dcument cmpsitin. The aim f this transfrmatin is t generate, frm a BibTeXML file, a DcBk dcument that presents the different entries f the bibligraphic file within fur different sectins. The first sectin prvides the full list f bibligraphic entries. The secnd sectin prvides the srted list f the different authrs referenced in the bibligraphy. The third sectin presents the titles f the bibligraphy titled entries (in a srted way. Finally, the last sectin prvides the list f referenced jurnals (in article entries. 1.1.1. Metamdels This transfrmatin is based n a simplified BibTeXML metamdel which nly deals with the mandatry fields f each BibTeX entries (fr instance, authr, year, title and jurnal fr an article entry. The cnsidered metamdel is presented in Figure 1, and prvided, in km3 frmat [3], in Appendix I. It has been designed in such a way that it shuld be easily extensible t handle ptinal fields (with minr mdificatins. Figure 1. The BibTeXML metamdel A bibligraphy is mdelized by a BibTeX File element. This element is cmpsed f BibTeX Entries which are each assciated with an id. All entries inherit, directly r indirectly, f the abstract BibTeX Page 1/12

Entry element. The abstract classes Authred Entry, Dated Entry, Titled Entry and Bk Titled Entry, as well as the Misc entry, directly inherit f BibTeX Entry. There are 13 pssible entry types: PhD Thesis, Master Thesis, Article, Tech Reprt, Unpublished, Manual, In Prceedings, Prceedings, Bklet, In Cllectin, Bk, In Bk and Misc. Cncrete BibTeX entries inherits frm sme f these abstract classes accrding t their set f mandatry fields. An authred entry may have several authrs (at least ne. It is pssible t nte that the Misc entry has n mandatry field. The transfrmatin als relies n a limited subset f the DcBk definitin. The metamdel cnsidered here is described in Figure 2, and prvided in Appendix II in km3 frmat. DcBk 1 * -dcbk -bks Bk 1 * -bk -articles Article TitleElement +title 1 * -article -sectins Sect1 -sectin-paras 1 * Para +cntent Figure 2. The DcBk metamdel Within this metamdel, a DcBk dcument is assciated with a DcBk element. Such an element is cmpsed f several Bks that, in their turn, are cmpsed f several Articles. An Article is cmpsed f Sectins ( Sect1 that are rdered. A Sectin is cmpsed f Paragraphs ( Para that are als rdered within each sectin. Bth Article and Sectin inherit frm the TitledElement abstract class. 1.1.2. Rules Specificatin These are the rules t transfrm a BibTeXML mdel t a DcBk mdel: Fr the rt BibTeX File element, the fllwing elements are created: A DcBk element; A Bk element (linked t the DcBk; Page 2/12

An Article element (linked t the Bk which title is BibTeXML t DcBk ; 4 Sectins elements (linked t the Article which titles respectively are References List fr Sectin 1 Authr List Sectin 2 Titles List Sectin 3 Jurnals List Sectin 4 Fr each distinct Authr, a Paragraph is created Its cntent is the authr name; It is linked t Sectin 2; Fr each untitled BibTeX Entry (entries that des nt inherit frm the Titled Entry class a Paragraph is created Its cntent cntains all available infrmatin n the Entry; It is linked t Sectin 1; Fr each Titled Entry, except Articles, the fllwing elements have t be created A Paragraph, linked t Sectin 1, that cntains all infrmatin n the Titled Entry; A Paragraph, linked t Sectin 3, that cntains the title f the Entry (each title nly appears nce; Fr each Article, the fllwing elements have t be created A Paragraph, linked t Sectin 1, that cntains all infrmatin n the Titled Entry; A Paragraph, linked t Sectin 3, that cntains the title f the Entry (each title nly appears nce; A Paragraph linked t Sectin 4, which cntains the name f the jurnal (each jurnal nly appears nce. 1.1.3. Cde This cde fr the BibTeXML t DcBk transfrmatin cnsists f 4 helpers and 9 rules. Amng helpers, authrset prvides a subset f Authr elements in which a same authr name appears nly nce. In the same way, titledentryset prvides a subset f TitledEntry elements in which a same title appears nly nce. Finally, articleset prvides a subset f Article elements in which a same jurnal name appears nly nce. Accrding t the type f each entry, the last helper, buildentrypara, builds the cntent f the paragraph that will be assciated, in the first sectin, with the entry. The rule Main allcates the structure f the DcBk mdel. This rule makes use f the thismdule.reslvetemp(e, str methd (in utputs se3 and se4. In the se3 utput, this methd makes it pssible t handle the utput elements generated in the titled_para utput f rule TitledEntry_NArticle (the ne matching the titledentryset elements. The methd is used in the same way in utput se4 t handle the utput elements generated in the jurnal_para utput f rule Article. The rule Authr allcates the DcBk paragraphs that cmpse the secnd sectin (list f the distinct authrs. Page 3/12

Since, with, a same surce element cannt be matched mre than nce, cntents f sectins 1, 3 and 4 are generated by the 7 fllwing rules: UntitledEntry, TitledEntry_Title_NArticle, TitledEntry_NTitle_NArticle, Article_Title_Jurnal, Article_NTitle_Jurnal, Article_Title_NJurnal and Article_NTitle_NJurnal. The rule UntitledEntry allcates a part f the first sectin (fr all untitled entries. The rule TitledEntry_Title_NArticle deals with titled entries that belng t the titledentryset set and are nt Articles. It allcates the crrespnding paragraphs in the first sectin, as well as the paragraphs f the third sectin that cntains distinct titles. TitledEntry_NTitle_NArticle is a similar rule that applies t entries that d nt belng t the titledentryset set and are nt Articles. As a cnsequence, it nly creates paragraph in the first sectin. The rule Article_Title_Jurnal allcates paragraphs in the first, the third and the frth sectins. This rule cnsiders Article entries that belng bth t articleset and titledentryset sets. Article_NTitle_Jurnal is a similar rule that nly applies t articles that belng t the articleset set, but nt t the titledentryset ne. It therefre creates paragraphs in the first and the frth sectins, but nt in the third ne. In the same way, Article_Title_NJurnal applies t articles that belng t the titledentryset set, but nt t the articleset ne. As a cnsequence, it nly creates paragraphs in the first and the third sectins. Finally, Article_NTitle_NJurnal deals with articles that belng neither t the titledentryset set, nr t the articleset ne. It creates a single paragraph in the first sectin. mdule BibTeX2DcBk; create OUT : DcBk frm IN : BibTeX; ------------------------------------------------------------------------------- -- HELPERS -------------------------------------------------------------------- ------------------------------------------------------------------------------- -- This helper builds the set f distinct authrs referenced in the input BibTeX -- mdel. -- Built set is srted by authr name. -- RETURN: Sequence(BibTeX!Authr helper def: authrset : Sequence(BibTeX!Authr = BibTeX!Authr.allInstances(- >iterate(e; ret : Sequence(BibTeX!Authr = Sequence { if ret->cllect(e e.authr->includes(e.authr then ret else ret->including(e endif ->srtedby(e e.authr; -- This helper builds the set f distinct titles referenced in the input BibTeX -- mdel. -- Built set is srted by title. -- RETURN: Sequence(BibTeX!TitledEntry helper def: titledentryset : Sequence(BibTeX!TitledEntry = BibTeX!TitledEntry.allInstances(->iterate(e; ret : Sequence(BibTeX!TitledEntry = Sequence { if ret->cllect(e e.title->includes(e.title then ret else ret->including(e endif ->srtedby(e e.title; -- This helper builds the set f distinct jurnals referenced in the input BibTeX -- mdel. -- Built set is srted by jurnal name. -- RETURN: Sequence(BibTeX!Article Page 4/12

helper def: articleset : Sequence(BibTeX!Article = BibTeX!Article.allInstances(- >iterate(e; ret : Sequence(BibTeX!Article = Sequence { if ret->cllect(e e.jurnal->includes(e.jurnal then ret else ret->including(e endif ->srtedby(e e.jurnal; -- This helper builds a string cntaining all infrmatin n a given BibTeXEntry. -- Cntent f the generated string depends n the entry type. -- IN: BibTeX!BibTeXEntry -- RETURN: Sequence(BibTeX!Authr helper cntext BibTeX!BibTeXEntry def: buildentrypara( : String = '[' + self.id + ']' + ' ' + self.cltype(.name + (if self.cliskindof(bibtex!titledentry then ' ' + self.title else '' endif + (if self.cliskindof(bibtex!authredentry then self.authrs->iterate(e; str : String = '' str + ' ' + e.authr else '' endif + (if self.cliskindof(bibtex!datedentry then ' ' + self.year else '' endif + (if self.cliskindof(bibtex!bktitledentry then ' ' + self.bktitle else '' endif + (if self.cliskindof(bibtex!thesisentry then ' ' + self.schl else '' endif + (if self.cliskindof(bibtex!article then ' ' + self.jurnal else '' endif + (if self.cliskindof(bibtex!unpublished then ' ' + self.nte else '' endif + (if self.cliskindof(bibtex!bk then ' ' + self.publisher else '' endif + (if self.cliskindof(bibtex!inbk then ' ' + self.chapter.tstring( else '' endif ; ------------------------------------------------------------------------------- -- RULES ---------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Rule 'Main' -- This rule generates the structure f the DcBk mdel frm a BibTeXFile element rule Main { frm bib : BibTeX!BibTeXFile t dc : DcBk!DcBk ( bks <- b b : DcBk!Bk ( articles <- art art : DcBk!Article ( title <- 'BibTeXML t DcBk', sectins_1 <- Sequence{se1, se2, se3, se4 se1 : DcBk!Sect1 ( title <- 'References List', paras <- BibTeX!BibTeXEntry.allInstances(->srtedBy(e e.id se2 : DcBk!Sect1 ( title <- 'Authrs list', Page 5/12

paras <- thismdule.authrset se3 : DcBk!Sect1 ( title <- 'Titles List', paras <- thismdule.titledentryset->cllect(e thismdule.reslvetemp(e, 'title_para' se4 : DcBk!Sect1 ( title <- 'Jurnals List', paras <- thismdule.articleset->cllect(e thismdule.reslvetemp(e, 'jurnal_para' -- Rule 'Authr' -- This rule generates a sectin_2 paragraph fr each distinct authr. rule Authr { frm a : BibTeX!Authr ( thismdule.authrset->includes(a t p1 : DcBk!Para ( cntent <- a.authr -- Rule 'UntitledEntry' -- This rule generates a sectin_1 paragraph fr each untitled entry. rule UntitledEntry { frm e : BibTeX!BibTeXEntry ( nt e.cliskindof(bibtex!titledentry t p : DcBk!Para ( cntent <- e.buildentrypara( -- Rule 'TitledEntry_Title_NArticle' -- [titledentryset cntains a subset f TitledEntry, s that each title -- appears nly nce in the set] -- Fr each "n article" titled entry that belngs t titledentryset, -- this rule generates: -- * a sectin_1 paragraph; -- * a sectin_3 paragraph. rule TitledEntry_Title_NArticle { frm e : BibTeX!TitledEntry ( thismdule.titledentryset->includes(e and nt e.cliskindof(bibtex!article t entry_para : DcBk!Para ( cntent <- e.buildentrypara( title_para : DcBk!Para ( cntent <- e.title Page 6/12

-- Rule 'TitledEntry_NTitle_NArticle' -- [titledentryset cntains a subset f TitledEntry, s that each title -- appears nly nce in the set] -- Fr each "n article" titled entry that des nt belng t titledentryset, -- this rule generates: -- * a sectin_1 paragraph; rule TitledEntry_NTitle_NArticle { frm e : BibTeX!TitledEntry ( nt thismdule.titledentryset->includes(e and nt e.cliskindof(bibtex!article t entry_para : DcBk!Para ( cntent <- e.buildentrypara( -- Rule 'Article_Title_Jurnal' -- [titledentryset cntains a subset f TitledEntry, s that each title -- appears nly nce in the set] -- [articleset cntains a subset f Article, s that each jurnal -- appears nly nce in the set] -- Fr each article entry that belngs t articleset, this rule generates: -- * a sectin_1 paragraph; -- * a sectin_3 paragraph; -- * a sectin_4 paragraph. rule Article_Title_Jurnal { frm e : BibTeX!Article ( thismdule.titledentryset->includes(e and thismdule.articleset->includes(e t entry_para : DcBk!Para ( cntent <- e.buildentrypara( title_para : DcBk!Para ( cntent <- e.title jurnal_para : DcBk!Para ( cntent <- e.jurnal -- Rule 'Article_NTitle_Jurnal' -- [titledentryset cntains a subset f TitledEntry, s that each title -- appears nly nce in the set] -- [articleset cntains a subset f Article, s that each jurnal -- appears nly nce in the set] -- Fr each article entry that belngs t articleset, this rule generates: -- * a sectin_1 paragraph; -- * a sectin_4 paragraph. rule Article_NTitle_Jurnal { frm e : BibTeX!Article ( nt thismdule.titledentryset->includes(e and thismdule.articleset->includes(e t entry_para : DcBk!Para ( cntent <- e.buildentrypara( Page 7/12

jurnal_para : DcBk!Para ( cntent <- e.jurnal -- Rule 'Article_Title_NJurnal' -- [titledentryset cntains a subset f TitledEntry, s that each title -- appears nly nce in the set] -- [articleset cntains a subset f Article, s that each jurnal -- appears nly nce in the set] -- Fr each article entry that belngs t articleset, this rule generates: -- * a sectin_1 paragraph; -- * a sectin_3 paragraph. rule Article_Title_NJurnal { frm e : BibTeX!Article ( thismdule.titledentryset->includes(e and nt thismdule.articleset->includes(e t entry_para : DcBk!Para ( cntent <- e.buildentrypara( title_para : DcBk!Para ( cntent <- e.title -- Rule 'Article_NTitle_NJurnal' -- [titledentryset cntains a subset f TitledEntry, s that each title -- appears nly nce in the set] -- [articleset cntains a subset f Article, s that each jurnal -- appears nly nce in the set] -- Fr each article entry that belngs t articleset, this rule generates: -- * a sectin_1 paragraph; rule Article_NTitle_NJurnal { frm e : BibTeX!Article ( nt thismdule.titledentryset->includes(e and nt thismdule.articleset->includes(e t entry_para : DcBk!Para ( cntent <- e.buildentrypara( Page 8/12

I. BibTeXML metamdel in km3 frmat package BibTeX { class BibTeXFile { reference entries[*] cntainer : BibTeXEntry; class Authr { attribute authr : String; abstract class BibTeXEntry { attribute id : String; abstract class AuthredEntry extends BibTeXEntry { reference authrs[1-*] cntainer : Authr; abstract class DatedEntry extends BibTeXEntry { attribute year : String; abstract class TitledEntry extends BibTeXEntry { attribute title : String; abstract class BkTitledEntry extends BibTeXEntry { attribute bktitle : String; class Article extends AuthredEntry, DatedEntry, TitledEntry { attribute jurnal : String; class TechReprt extends AuthredEntry, DatedEntry, TitledEntry { class Unpublished extends AuthredEntry, TitledEntry { attribute nte : String; class Manual extends TitledEntry { class Prceedings extends DatedEntry, TitledEntry { class InPrceedings extends Prceedings, AuthredEntry, BkTitledEntry { class Bklet extends DatedEntry { Page 9/12

class Bk extends AuthredEntry, DatedEntry, TitledEntry { attribute publisher : String; class InCllectin extends Bk, BkTitledEntry { class InBk extends Bk { attribute chapter : Integer; class Misc extends BibTeXEntry { { abstract class ThesisEntry extends AuthredEntry, DatedEntry, TitledEntry attribute schl : String; class PhDThesis extends ThesisEntry { class MasterThesis extends ThesisEntry { package PrimitiveTypes { datatype String; datatype Integer; Page 10/12

II. DcBk metamdel in km3 frmat package DcBk { class DcBk { reference bks [1-*] rdered cntainer: Bk; class Bk { reference articles [1-*] rdered cntainer: Article; abstract class TitledElement { attribute title : String; class Article extends TitledElement { reference sectins_1 [1-*] rdered cntainer : Sect1; class Sect1 extends TitledElement { reference paras [1-*] rdered cntainer: Para; class Para { attribute cntent : String; package PrimitiveTypes { datatype String; Page 11/12

References [1] BibTeXML, BibTeX as XML markup, http://bibtexml.surcefrge.net/. [2] DcBk: The Definitive Guide. Nrman Walsh. O Reilly & Assciates, Inc. Octber 1999. [3] KM3: Kernel MetaMetaMdel. Available at http://dev.eclipse.rg/viewcvs/indextech.cgi/~checkut~/gmthme/dc/atl/index.html. Page 12/12