Title: XMLApe Architecture
1XMLApe Architecture
XMLApe Data Source
XMLApe Engine
XMLApe GUI
XMLApe Data Source
Figure 1
2EXAMPLE - Flights Schema
ltxsdschema xmlnsxsd"http//www.w3.org/2001
/XMLSchema" targetNamespace"http//xmlape.cc.
gatech.edu/myflights" xmlns"http//xmlape.cc.
gatech.edu/myflights" elementFormDefault"qual
ified"gt ltxsdelement name"flights"gt
ltxsdcomplexTypegt ltxsdsequencegt
ltxsdelement ref"flight" minOccurs"0"
maxOccurs"unbounded"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdelementgt
ltxsdelement name"flight" type"flightType"/gt
ltxsdcomplexType name"flightType"gt
ltxsdsequencegt ltxsdelement name"airline"
type"xsdstring" minOccurs"1" maxOccurs"1"/gt
ltxsdelement name"from" type"xsdstring"
minOccurs"1" maxOccurs"1"/gt ltxsdelement
name"to" type"xsdstring" minOccurs"1"
maxOccurs"1"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdschemagt
Figure 2
3EXAMPLE - Flights Data
lt?xml version"1.0"?gt ltflights
xmlns"http//xmlape.cc.gatech.edu/myflights"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xsischemaLocation"http//xmlape.cc.gatec
h.edu/myflights
myflights.xsd"gt ltflightgt ltairlinegtDeltalt/air
linegt ltfromgtAtlantalt/fromgt
lttogtDetroitlt/togt lt/flightgt ltflightgt
ltairlinegtDeltalt/airlinegt ltfromgtDetroitlt/fromgt
lttogtAtlantalt/togt lt/flightgt ltflightgt
ltairlinegtUSAirwayslt/airlinegt ltfromgtNew
Yorklt/fromgt lttogtLos Angeleslt/togt
lt/flightgt lt/flightsgt
Figure 3
4EXAMPLE - Car Rentals Schema
ltxsdschema xmlnsxsd"http//www.w3.org/2001
/XMLSchema" targetNamespace"http//xmlape.cc.
gatech.edu/myrental" xmlns"http//xmlape.cc.g
atech.edu/myrental" elementFormDefault"qualif
ied"gt ltxsdelement name"rentals"gt
ltxsdcomplexTypegt ltxsdsequencegt
ltxsdelement ref"rental" minOccurs"0"
maxOccurs"unbounded"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdelementgt
ltxsdelement name"rental" type"rentalType"/gt
ltxsdcomplexType name"rentalType"gt
ltxsdsequencegt ltxsdelement name"company"
type"xsdstring" minOccurs"1" maxOccurs"1"/gt
ltxsdelement name"from" type"xsdstring"
minOccurs"1" maxOccurs"1"/gt ltxsdelement
name"to" type"xsdstring" minOccurs"1"
maxOccurs"1"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdschemagt
Figure 4
5EXAMPLE - Car Rentals data
lt?xml version"1.0"?gt ltrentals
xmlns"http//xmlape.cc.gatech.edu/myrental"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xsischemaLocation"http//xmlape.cc.gatec
h.edu/myrental
myrental.xsd"gt ltrentalgt ltcompanygtAvislt/compa
nygt ltfromgtAtlantalt/fromgt
lttogtAtlantalt/togt lt/rentalgt ltrentalgt
ltcompanygtDollarlt/companygt ltfromgtAtlantalt/fromgt
lttogtAthenslt/togt lt/rentalgt ltrentalgt
ltcompanygtThriftylt/companygt ltfromgtNew
Yorklt/fromgt lttogtHartfordlt/togt
lt/rentalgt lt/rentalsgt
Figure 5
6Start screen with s-buttons and empty XMLApe
Query Form
Figure 6
7Query Schema
lt?xml version"1.0" encoding"UTF-8"?gt ltxsdschema
xmlnsxsd"http//www.w3.org/2001/XMLSchema"
targetNamespace"http//xmlape.cc.gtri.gatech
.edu/query" xmlns"http//xmlape.cc.gtri.gatec
h.edu/query" elementFormDefault"qualified"gt
ltxsdelement name"query" type"queryType" /gt
ltxsdcomplexType name"queryType"gt
ltxsdsequencegt ltxsdelement name"source"
type"sourceType" minOccurs"0"
maxOccurs"unbounded" /gt ltxsdelement
name"select" type"selectType" minOccurs"0"
maxOccurs"unbounded" /gt ltxsdelement
name"join" type"joinType" minOccurs"0"
maxOccurs"unbounded" /gt lt/xsdsequencegt
lt/xsdcomplexTypegt ltxsdcomplexType
name"sourceType"gt ltxsdsequencegt ltxsdelemen
t name"location" type"xsdanyURI" minOccurs"1"
maxOccurs"1" /gt ltxsdelement name"alias"
type"xsdstring" minOccurs"1" maxOccurs"1"/gt
lt/xsdsequencegt lt/xsdcomplexTypegt
Figure 7
8Query Schema (cont.)
ltxsdcomplexType name"selectType"gt
ltxsdsequencegt ltxsdelement name"schemaRef"
type"schemaRefType" minOccurs"1"
maxOccurs"1"/gt ltxsdelement name"value"
type"xsdstring" minOccurs"1" maxOccurs"1"/gt
lt/xsdsequencegt lt/xsdcomplexTypegt
ltxsdcomplexType name"joinType"gt
ltxsdsequencegt ltxsdelement
name"schemaRef" type"schemaRefType"
minOccurs"2" maxOccurs"unbounded" /gt
lt/xsdsequencegt lt/xsdcomplexTypegt
ltxsdcomplexType name"schemaRefType"gt
ltxsdsequencegt ltxsdelement name"alias"
type"xsdstring" minOccurs"1" maxOccurs"1"/gt
lt!-- change the type to specify XPath when
we get a grip on that --gt ltxsdelement
name"field" type"xsdstring" minOccurs"1"
maxOccurs"1"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdschemagt
Figure 8
9Empty Query Document
lt?xml version"1.0" encoding"UTF-8"?gt ltquery
xmlns"http//xmlape.cc.gtri.gatech.edu/query"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xsischemaLocation
"http//xmlape.cc.gtri.gatech.edu/query
query.xsd"gt lt/querygt
Figure 9
10Empty Query Result Schema
ltxsdschema xmlnsxsd"http//www.w3.org/2001
/XMLSchema" targetNamespace"query1_results"
xmlns"query1_results" elementFormDefault"
qualified"gt ltxsdelement name"results"gt
ltxsdcomplexTypegt ltxsdsequencegt
ltxsdelement ref"result" minOccurs"0"
maxOccurs"unbounded"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdelementgt
ltxsdelement name"result" type"resultType"/gt
ltxsdcomplexType name"resultType"gt
ltxsdsequencegt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdschemagt
Figure 10
11Empty Query Result Data
lt?xml version"1.0"?gt ltresults
xmlns"query1_results" xmlnsxsi"http//www.w
3.org/2001/XMLSchema-instance"
xsischemaLocation"query1_results
query1_results.xsd"gt lt/resultsgt
Figure 11
12XMLApe Query Form generated by the GUI from the
XML schema in Figure 2
Figure 12
13XMLApe Query Form two FLIGHT schemas, Figure 2,
and one RENTAL schema, Figure 4
Figure 13
143-source Query Document after Figure 13 no
selections no joins
lt?xml version"1.0" encoding"UTF-8"?gt ltquery
xmlns"http//xmlape.cc.gtri.gatech.edu/query"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xsischemaLocation
"http//xmlape.cc.gtri.gatech.edu/query
query.xsd"gt ltsourcegt lt!-- datasource
for 'myflights.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myflights.da
tasourcelt/locationgt ltaliasgtmyflights1lt/alias
gt lt/sourcegt ltsourcegt lt!-- datasource
for 'myflights.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myflights.da
tasourcelt/locationgt ltaliasgtmyflights2lt/alias
gt lt/sourcegt ltsourcegt lt!-- datasource
for 'myrental.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myrental.dat
asourcelt/locationgt ltaliasgtmyrental1lt/aliasgt
lt/sourcegt lt/querygt
Figure 14
15Result Schema for 3-source query no selections
no joins
ltxsdschema xmlnsxsd"http//www.w3.org/2001
/XMLSchema" targetNamespace"query2_results"
xmlns"query2_results" xmlnsmyrental"http
//xmlape.cc.gatech.edu/myrental"
xmlnsmyflights"http//xmlape.cc.gatech.edu/myfli
ghts" elementFormDefault"qualified"gt
ltxsdimport namespace"http//xmlape.cc.gatech.edu
/myrental" schemaLocation"myrental.xsd"/gt
ltxsdimport namespace"http//xmlape.cc.gatech.edu
/myflights" schemaLocation"myflights.xsd"/gt
ltxsdelement name"results"gt
ltxsdcomplexTypegt ltxsdsequencegt
ltxsdelement ref"result" minOccurs"0"
maxOccurs"unbounded"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdelementgt
ltxsdelement name"result" type"resultType"/gt
ltxsdcomplexType name"resultType"gt
ltxsdsequencegt ltxsdelement
name"myflights1" type"myflightsflightType"
minOccurs"1" maxOccurs"1"/gt ltxsdelement
name"myflights2" type"myflightsflightType"
minOccurs"1" maxOccurs"1"/gt ltxsdelement
name"myrental1" type"myrentalrentalType"
minOccurs"1" maxOccurs"1"/gt
lt/xsdsequencegt lt/xsdcomplexTypegt lt/xsdschem
agt
Figure 15
16Result Data for 3-source queryno selections no
joins
lt?xml version"1.0"?gt ltresults
xmlns"query2_results" xmlnsxsi"http//www.w
3.org/2001/XMLSchema-instance"
xmlnsmyrental"http//xmlape.cc.gatech.edu/myrent
al" xmlnsmyflights"http//xmlape.cc.gatech.edu
/myflights" xsischemaLocation"query2_results
query2_results.xsd"gt
ltresultgt ltmyflights1gt
ltmyflightsairlinegtDeltalt/myflightsairlinegt
ltmyflightsfromgtAtlantalt/myflightsfromgt
ltmyflightstogtDetroitlt/myflightstogt
lt/myflights1gt ltmyflights2gt
ltmyflightsairlinegtDeltalt/myflightsairlinegt
ltmyflightsfromgtAtlantalt/myflightsfromgt
ltmyflightstogtDetroitlt/myflightstogt
lt/myflights2gt ltmyrental1gt
ltmyrentalcompanygtAvislt/myrentalcompanygt
ltmyrentalfromgtAtlantalt/myrentalfromgt
ltmyrentaltogtAtlantalt/myrentaltogt
lt/myrental1gt lt/resultgt
Figure 16
17Result Data for 3-source queryno selections no
joins (cont.)
25 more ltresultgts . and, finally, the last
one ltresultgt ltmyflights1gt
ltmyflightsairlinegtUSAirwayslt/myflightsairlinegt
ltmyflightsfromgtNew Yorklt/myflightsfromgt
ltmyflightstogtLos Angeleslt/myflightstogt
lt/myflights1gt ltmyflights2gt
ltmyflightsairlinegtUSAirwayslt/myflightsairlinegt
ltmyflightsfromgtNew Yorklt/myflightsfromgt
ltmyflightstogtLos Angeleslt/myflightstogt
lt/myflights2gt ltmyrental1gt
ltmyrentalcompanygtThriftylt/myrentalcompanygt
ltmyrentalfromgtNew Yorklt/myrentalfromgt
ltmyrentaltogtHartfordlt/myrentaltogt
lt/myrental1gt lt/resultgt lt/resultsgt
Figure 17
18Query w/selections and joins in the XMLApe Query
Form
Surprise vacation Leaving Detroit flying
somewhere. Picking up a rental from that place
and returning it to the same place. Leaving that
place flying somewhere else.
Figure 18
19Query Document w/selections and joins
corresponding to Figure 18
lt?xml version"1.0" encoding"UTF-8"?gt ltquery
xmlns"http//xmlape.cc.gtri.gatech.edu/query"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xsischemaLocation
"http//xmlape.cc.gtri.gatech.edu/query
query.xsd"gt ltsourcegt lt!-- datasource
for 'myflights.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myflights.da
tasourcelt/locationgt ltaliasgtmyflights1lt/alias
gt lt/sourcegt ltsourcegt lt!-- datasource
for 'myflights.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myflights.da
tasourcelt/locationgt ltaliasgtmyflights2lt/alias
gt lt/sourcegt ltsourcegt lt!-- datasource
for 'myrental.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myrental.dat
asourcelt/locationgt ltaliasgtmyrental1lt/aliasgt
lt/sourcegt
Figure 19
20Query Document w/selections and joins
(cont.)corresponding to Figure 18
ltselectgt ltschemaRefgt
ltaliasgtmyflights1lt/aliasgt ltfieldgt"XPath
expression flightTypefrom"lt/fieldgt
lt/schemaRefgt ltvaluegtDetroitlt/valuegt
lt/selectgt ltjoingt ltschemaRefgt
ltaliasgtmyflights1lt/aliasgt ltfieldgt"XPath
expression flightTypeto"lt/fieldgt
lt/schemaRefgt ltschemaRefgt
ltaliasgtmyflights2lt/aliasgt ltfieldgt"XPath
expression flightTypefrom"lt/fieldgt
lt/schemaRefgt ltschemaRefgt
ltaliasgtmyrental1lt/aliasgt ltfieldgt"XPath
expression myRentalfrom"lt/fieldgt
lt/schemaRefgt ltschemaRefgt
ltaliasgtmyrental1lt/aliasgt ltfieldgt"XPath
expression myRentalto"lt/fieldgt
lt/schemaRefgt lt/joingt lt/querygt
Figure 20
21Schema for Result of query in Figure 19-20
ltxsdschema xmlnsxsd"http//www.w3.org/2001
/XMLSchema" targetNamespace"query3_results"
xmlns"query3_results" xmlnsmyrental"http
//xmlape.cc.gatech.edu/myrental"
xmlnsmyflights"http//xmlape.cc.gatech.edu/myfli
ghts" elementFormDefault"qualified"gt
ltxsdimport namespace"http//xmlape.cc.gatech.edu
/myrental" schemaLocation"myrental.xsd"/gt
ltxsdimport namespace"http//xmlape.cc.gatech.edu
/myflights" schemaLocation"myflights.xsd"/gt
ltxsdelement name"results"gt
ltxsdcomplexTypegt ltxsdsequencegt
ltxsdelement ref"result" minOccurs"0"
maxOccurs"unbounded"/gt lt/xsdsequencegt
lt/xsdcomplexTypegt lt/xsdelementgt
ltxsdelement name"result" type"resultType"/gt
ltxsdcomplexType name"resultType"gt
ltxsdsequencegt ltxsdelement
name"myflights1" type"myflightsflightType"
minOccurs"1" maxOccurs"1"/gt ltxsdelement
name"myflights2" type"myflightsflightType"
minOccurs"1" maxOccurs"1"/gt ltxsdelement
name"myrental1" type"myrentalrentalType"
minOccurs"1" maxOccurs"1"/gt
lt/xsdsequencegt lt/xsdcomplexTypegt lt/xsdschem
agt
Figure 21
22Result Data for query in Figure 19-20
lt?xml version"1.0"?gt ltresults
xmlns"query3_results" xmlnsxsi"http//www.w
3.org/2001/XMLSchema-instance"
xmlnsmyrental"http//xmlape.cc.gatech.edu/myrent
al" xmlnsmyflights"http//xmlape.cc.gatech.edu
/myflights" xsischemaLocation"query3_results
query3_results.xsd"gt
ltresultgt ltmyflights1gt
ltmyflightsairlinegtDeltalt/myflightsairlinegt
ltmyflightsfromgtDetroitlt/myflightsfromgt
ltmyflightstogtAtlantalt/myflightstogt
lt/myflights1gt ltmyflights2gt
ltmyflightsairlinegtDeltalt/myflightsairlinegt
ltmyflightsfromgtAtlantalt/myflightsfromgt
ltmyflightstogtDetroitlt/myflightstogt
lt/myflights2gt ltmyrental1gt
ltmyrentalcompanygtAvislt/myrentalcompanygt
ltmyrentalfromgtAtlantalt/myrentalfromgt
ltmyrentaltogtAtlantalt/myrentaltogt
lt/myrental1gt lt/resultgt lt/resultsgt
Figure 22
23Engine Query Document breakdown (1 of 3) from
Figure 19-20
lt?xml version"1.0" encoding"UTF-8"?gt ltquery
xmlns"http//xmlape.cc.gtri.gatech.edu/query"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xsischemaLocation
"http//xmlape.cc.gtri.gatech.edu/query
query.xsd"gt ltsourcegt lt!-- datasource
for 'myflights.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myflights.da
tasourcelt/locationgt ltaliasgtmyflights1lt/alias
gt lt/sourcegt ltselectgt ltschemaRefgt
ltaliasgtmyflights1lt/aliasgt
ltfieldgt"XPath expression flightTypefrom"lt/fieldgt
lt/schemaRefgt ltvaluegtDetroitlt/valuegt
lt/selectgt lt/querygt
Figure 23
24Engine Result Data for query in Figure 23
lt?xml version"1.0"?gt ltflights
xmlns"http//xmlape.cc.gatech.edu/myflights"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xsischemaLocation"http//xmlape.cc.gatec
h.edu/myflights
myflights.xsd"gt ltflightgt ltairlinegtDeltalt/air
linegt ltfromgtDetroitlt/fromgt
lttogtAtlantalt/togt lt/flightgt lt/flightsgt
Figure 24
25Engine Query Document breakdown (2 of 3) from
Figure 19-20
lt?xml version"1.0" encoding"UTF-8"?gt ltquery
xmlns"http//xmlape.cc.gtri.gatech.edu/query"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xsischemaLocation
"http//xmlape.cc.gtri.gatech.edu/query
query.xsd"gt ltsourcegt lt!-- datasource
for 'myflights.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myflights.da
tasourcelt/locationgt ltaliasgtmyflights2lt/alias
gt lt/sourcegt lt/querygt
Figure 25
26Engine Result Data for query in Figure 25
lt?xml version"1.0"?gt ltflights
xmlns"http//xmlape.cc.gatech.edu/myflights"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xsischemaLocation"http//xmlape.cc.gatec
h.edu/myflights
myflights.xsd"gt ltflightgt ltairlinegtDeltalt/air
linegt ltfromgtAtlantalt/fromgt
lttogtDetroitlt/togt lt/flightgt ltflightgt
ltairlinegtDeltalt/airlinegt ltfromgtDetroitlt/fromgt
lttogtAtlantalt/togt lt/flightgt ltflightgt
ltairlinegtUSAirwayslt/airlinegt ltfromgtNew
Yorklt/fromgt lttogtLos Angeleslt/togt
lt/flightgt lt/flightsgt
Figure 26
27Engine Query Document breakdown (3 of 3) from
Figure 19-20
lt?xml version"1.0" encoding"UTF-8"?gt ltquery
xmlns"http//xmlape.cc.gtri.gatech.edu/query"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-insta
nce" xsischemaLocation
"http//xmlape.cc.gtri.gatech.edu/query
query.xsd"gt ltsourcegt lt!-- datasource
for 'myrental.xsd' schema --gt
ltlocationgthttp//xmlape.cc.gatech.edu/myrental.dat
asourcelt/locationgt ltaliasgtmyrental1lt/aliasgt
lt/sourcegt ltjoingt ltschemaRefgt
ltaliasgtmyrental1lt/aliasgt ltfieldgt"XPath
expression myRentalfrom"lt/fieldgt
lt/schemaRefgt ltschemaRefgt
ltaliasgtmyrental1lt/aliasgt ltfieldgt"XPath
expression myRentalto"lt/fieldgt
lt/schemaRefgt lt/joingt lt/querygt
Figure 27
28Engine Result Data for query in Figure 27
lt?xml version"1.0"?gt ltrentals
xmlns"http//xmlape.cc.gatech.edu/myrental"
xmlnsxsi"http//www.w3.org/2001/XMLSchema-instan
ce" xsischemaLocation"http//xmlape.cc.gatec
h.edu/myrental
myrental.xsd"gt ltrentalgt ltcompanygtAvislt/compa
nygt ltfromgtAtlantalt/fromgt
lttogtAtlantalt/togt lt/rentalgt lt/rentalsgt
Figure 28
29Engine Join Results from Figure 24-26-28 to get
Result in Figure 22
lt?xml version"1.0"?gt ltresults
xmlns"query3_results" xmlnsxsi"http//www.w
3.org/2001/XMLSchema-instance"
xmlnsmyrental"http//xmlape.cc.gatech.edu/myrent
al" xmlnsmyflights"http//xmlape.cc.gatech.edu
/myflights" xsischemaLocation"query3_results
query3_results.xsd"gt
ltresultgt ltmyflights1gt
ltmyflightsairlinegtDeltalt/myflightsairlinegt
ltmyflightsfromgtDetroitlt/myflightsfromgt
ltmyflightstogtAtlantalt/myflightstogt
lt/myflights1gt ltmyflights2gt
ltmyflightsairlinegtDeltalt/myflightsairlinegt
ltmyflightsfromgtAtlantalt/myflightsfromgt
ltmyflightstogtDetroitlt/myflightstogt
lt/myflights2gt ltmyrental1gt
ltmyrentalcompanygtAvislt/myrentalcompanygt
ltmyrentalfromgtAtlantalt/myrentalfromgt
ltmyrentaltogtAtlantalt/myrentaltogt
lt/myrental1gt lt/resultgt lt/resultsgt
Figure 29