SlideShare a Scribd company logo
1 of 12
Download to read offline
TYPE LANDSCAPES
Discovering type dependencies with Schema Studio
D. Harrison
January 2024
© 2024, David Harrison, All Rights Reserved
2
CONTENTS
INTRODUCTION........................................................................... 3
LANDSCAPE DISCOVERY............................................................... 3
AN EXAMPLE ............................................................................... 4
SCHEMA STUDIO IMPLEMENTATION............................................... 8
SUMMARY................................................................................. 12
3
INTRODUCTION
In an earlier article1 the broad notion of the generation of a type being related
to a landscape of dependent types, was introduced. Additionally, in the related
articles in the “Xsd Generation” series2, the application Schema Studio was
shown in the context of the overall W3C schema to strong type generation
process.
In a yet more recent article3, where the central topic was the current
refactoring of the processor which forms the central “engine” of Schema
Studio, we delved a little deeper into the type landscape. Having shown the
base generated form of the Open Travel Alliance message definition represented
by OTA_PingRQ (arguably the simplest message in the Open Travel message
ecosystem), the “next step” was touched upon. This involved taking the much
more complex OTA_CancelRQ as the source for further refactoring of the
processor codebase.
As before, for simplicity, we will be taking schema examples from the Open
Travel Alliance4 set as a basis for our journey.
LANDSCAPE DISCOVERY
In the earlier discussion3 about generating the Open Travel type OTA_CancelRQ ,
we set out the range of types that would need to be to hand in order have a
working class representing the message OTA_CancelRQ. The identification of
these dependent types was a manual, tedious and error-prone process.
It is the focus of this article to show the refactoring of the Schema Studio
application itself aiming to provide an automated way of generating a type
dependency tree for any selected top-level item.
The process of discovery is not along the lines adopted for the first pass of the
processor, walking the schema in detail and building a so-called Structure
Element repository. Instead, we take the top-level item and recursively drill
down from this as the root looking for manifest types, thus building a tree of
type names at the different levels It is the types thus identified that must
necessarily be generated to support the execution (and testing) of the specified
top-level item.
1
Generation_XSD_Article.docx (slideshare.net)
2
Generation_XSD_Article - Part 2.pdf (slideshare.net)
3
Processor Refactoring.pdf (slideshare.net)
4
OpenTravel | OpenTravel
4
AN EXAMPLE
To get a clear picture of how this new functionality works, let us take the case
of SourceType (defined in OTA_CommonTypes.xsd), a definitional structure present
in the top-level message OTA_CancelRQ, a component part of the type POS_Type:
OTA_Cancel_RQ
POS_Type
5
SourceType
Where, in the last figure, only a part of the definition is shown as it is given in
OTA_CommonTypes.xsd.
In the specific top-level type SourceType, the dependent types, those that need
to be available in order to construct this strong type, form a tree-like structure,
the individual nodes of which can be represented by the following pattern
root-type-name
inner-type-name
…
Thus, walking through the XSD structure, by hand, the tree looks as shown
below:
SourceType (OTA_CommonTypes (OTA_CommonTypes.xsd)
UniqueID_Type (referenced in: OTA_CommonTypes)
CompanyNameType (referenced in: OTA_CommonTypes)
StringLength0to128 (defined in: OTA_SimpleTypes.xsd)
CompanuID_AttributesGroup (referenced in: OTA_CommonTypes)
StringLength1to32 (defined in: OTA_SimpleTypes.xsd)
OTA_CodeType (referenced in: OTA_SimpleTypes.xsd)
xs:string (W3cPrimitives)
6
StringLength1to16 (referenced in: OTA_SimpleTypes.xsd)
StringLength1to32 (referenced in: OTA_SimpleTypes.xsd)
ISO3166 (referenced in: OTA_SimpleTypes.xsd)
xs:string (W3cPrimitive)
StringLength1to32 (referenced in: OTA_SimpleTypes.xsd)
StringLength1to32 (referenced in: OTA_SimpleTypes.xsd)
TPA_Extensions (referenced in: OTA_CommonTypes.xsd)
TPA_ExtensionsType (defined in: OTA_CommonTypes.xsd)
UniqueID_Group (referenced in: OTA_CommonTypes.xsd)
xs:anyURI (W3cPrimitives)
OTA_CodeType (referenced in: OTA_CommonTypes.xsd)
xs:string (W3cPrimitive)
StringLength1to32 (referenced in: OTA_CommonTypes.xsd)
StringLength1to32 (referenced in: OTA_CommonTypes.xsd)
StringLength1to32 (referenced in: OTA_CommonTypes.xsd)
StringLength1to16 (referenced in: OTA_CommonTypes.xsd)
StringLength1to64 (referenced in: OTA_CommonTypes.xsd)
PositionGroup (referenced in: OTA_CommonTypes.xsd)
StringLength1to16 (referenced in: OTA_CommonTypes.xsd)
StringLength1to16 (referenced in: OTA_CommonTypes.xsd)
StringLength1to16 (referenced in: OTA_CommonTypes.xsd)
OTA_CodeType (referenced in: OTA_SimpleTypes.xsd)
xs:string (W3cPrimitives)
OTA_CodeType (referenced in: OTA_SimpleTypes.xsd)
xs:string (W3cPrimitives)
CompanyNameType (defined in: OTA_CommonTypes.xsd)
StringLength0to128 (defined in: OTA_SimpleTypes.xsd)
CompanyID_AttributesGroup (referenced in: OTA_CommonTypes.xsd)
StringLength1to32 (defined in: OTA_SimpleTypes.xsd)
OTA_CodeType (referenced in: OTA_SimpleTypes.xsd)
xs:string (W3cPrimitives)
StringLength1to16 (defined in: OTA_SimpleTypes.xsd)
StringLength1to32 (defined in: OTA_SimpleTypes.xsd)
ISO3166 (referenced in: OTA_CommonTypes.xsd)
xs:string (W3cPrimitives)
StringLength1to32 (defined in: OTA_SimpleTypes.xsd)
StringLength1to32 (defined in: OTA_SimpleTypes.xsd)
TPA_Extensions (referenced in: OTA_CommonTypes)
TPA_ExtensionsType (defined in: OTA_CommonTypes.xsd)
BookingChannelGoup (referenced in: OTA_CommonTypes)
OTA_ CodeType (referenced in OTA_SimpleTypes.xsd)
xs:string (W3cPrimitives)
xs:Boolean (W3cPrimitives)
TPA_Extensions (referenced in: OTA_CommonTypes)
TPA_ExtensionsType (defined in: OTA_CommonTypes.xsd)
StringLength1to16 (referenced in: OTA_SimpleTypes.xsd)
StringLength1to16 (referenced in: OTA_SimpleTypes.xsd)
ISO3166 (referenced in: OTA_SimpleTypes.xsd)
xs:string (W3cPrimitives)
AlphaLength3 (referenced in: OTA_SimpleTypes.xsd)
StringLength1to16 (referenced in: OTA_SimpleTypes.xsd)
UpperCaseAlphaNumericLength2to3 (referenced in: OTA_SimpleTypes.xsd)
UpperCaseAlphaNumericLength3to5 (referenced in: OTA_SimpleTypes.xsd)
StringLength3 (referenced in: OTA_SimpleTypes.xsd)
StringLength1to16 (referenced in: OTA_SimpleTypes.xsd)
StringLength1to32 (referenced in: OTA_SimpleTypes.xsd)
The structure above contains a range of repeated types, such as
StringLength1to16, OTA_CodeType and TPA_Extensions. In addition, the structure
contains the W3c primitives, such as xs:boolean and xs:string, these having
concrete implementations named W3cBoolean and W3cString, respectively, in the
type landscape within the scope of Schema Studio.
7
The types specified in SourceType can be found either in OTA_CommonTypes.xsd,
or any of the “include” files, OTA_SimpleTypes.xsd or OTA_Lists.xsd. The
discovery algorithm needs to take account of this possibility and move through
the changing “include” landscape when a named type cannot be found in the
schema currently in scope.
It is the types shown in this diagram that need to have their equivalent strong
type generated and available, to fully build (and test) the single part of
OTA_CancelRQ, SourceType.
Having such a dependency list, related to any top-level type of interest, the
user of Schema Studio can optimise the work of code generation. Rather than
generate all the types defined in a schema set or silo, it is now possible to be
more efficient.
In practice, this need to be selective of types when performing a generation
step might be as a response to changes within individual schemas, in which
case many of the dependent strong types will already exist in the scope of a
development process.
However, the above diagram was a result of manually walking the type of
interest and drilling down until a “leaf” type was reached. This is a tedious and
error-prone process. Schema Studio, thankfully, has the functionality to
produce this type landscape for us.
8
Schema Studio Implementation
The main view of Schema Studio is as shown below with the appropriate Open
Travel schema set loaded, the silo, “general”, open and SourceType selected in
the main schema/type tree view. In addition, the context menu is open on the
type node and here we see the operational possibilities available, one of which
is “Generate Type View”.
On the right-hand panel of the view shown below, for convenience, the XSD
view of the type is displayed, achieved by double-clicking the selected item in
the left hand tree view.
If this “Generate Type View” option is selected then a form is shown which
displays the corresponding type landscape:
9
In this panel view, the landscape, as in our manual diagram, is shown as a tree
with each node having a checkbox. This allows the user to record which types
have been generated. The panel also has a button which allows the tree view to
be fully expanded (as in the above view). Additionally, the user can signal that
all child nodes are to be checked, via the “Auto check child nodes” checkbox.
When checked, and the “UniqueD_Type” tree node checkbox is checked (and
“expand all” is checked):
10
The diagram can be saved and re-loaded via the buttons on the right hand
panel. It should be noted that the W3c primitive types such as “xs:boolean” and
“xs:string” have concrete strong types within the scope of Schema Studio
(separate library), being represented as W3cBoolean and W3cString.
The saved form is XML, and in the case of SourceType, has the content shown in
the following fragment:
11
As can be seen, each of the nodes also records the checkbox state.
This file is saved to a specific named folder in the same place as the
corresponding schema silo and specialised by the type name, e.g.:
C:...OpenTravelOTAV2014BgeneralTypeLandscapesSourceType-TypeLandscape.xml
12
Summary
The foregoing has presented a mechanism in Schema Studio which allows the
landscape of types, needed to satisfy the build-time requirements for any top-
level type, to be established.
The user can easily interact with the type landscape view and record what types
have been generated, saving and loading the diagram as generation proceeds.

More Related Content

Similar to SchemaStudioTypeLandscape_Article.pdf

Processor Refactoring.pdf
Processor Refactoring.pdfProcessor Refactoring.pdf
Processor Refactoring.pdfDavid Harrison
 
scala.reflect, Eugene Burmako
scala.reflect, Eugene Burmakoscala.reflect, Eugene Burmako
scala.reflect, Eugene BurmakoVasil Remeniuk
 
Евгений Бурмако «scala.reflect»
Евгений Бурмако «scala.reflect»Евгений Бурмако «scala.reflect»
Евгений Бурмако «scala.reflect»e-Legion
 
High-Level Display: Screen J2ME User Interface
High-Level Display: Screen J2ME User InterfaceHigh-Level Display: Screen J2ME User Interface
High-Level Display: Screen J2ME User Interfacesuman sinkhwal
 
Metaprogramming in Scala 2.10, Eugene Burmako,
Metaprogramming  in Scala 2.10, Eugene Burmako, Metaprogramming  in Scala 2.10, Eugene Burmako,
Metaprogramming in Scala 2.10, Eugene Burmako, Vasil Remeniuk
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1bharath yelugula
 
Article link httpiveybusinessjournal.compublicationmanaging-.docx
Article link httpiveybusinessjournal.compublicationmanaging-.docxArticle link httpiveybusinessjournal.compublicationmanaging-.docx
Article link httpiveybusinessjournal.compublicationmanaging-.docxfredharris32
 
Android Application Development - Level 2
Android Application Development - Level 2Android Application Development - Level 2
Android Application Development - Level 2Isham Rashik
 
ContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docxContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docxdickonsondorris
 
ConcordanceProject
ConcordanceProjectConcordanceProject
ConcordanceProjectMark Short
 
Serialization in .NET
Serialization in .NETSerialization in .NET
Serialization in .NETAbhi Arya
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkitnikhilyagnic
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docxhoney725342
 

Similar to SchemaStudioTypeLandscape_Article.pdf (20)

Processor Refactoring.pdf
Processor Refactoring.pdfProcessor Refactoring.pdf
Processor Refactoring.pdf
 
scala.reflect, Eugene Burmako
scala.reflect, Eugene Burmakoscala.reflect, Eugene Burmako
scala.reflect, Eugene Burmako
 
Евгений Бурмако «scala.reflect»
Евгений Бурмако «scala.reflect»Евгений Бурмако «scala.reflect»
Евгений Бурмако «scala.reflect»
 
High-Level Display: Screen J2ME User Interface
High-Level Display: Screen J2ME User InterfaceHigh-Level Display: Screen J2ME User Interface
High-Level Display: Screen J2ME User Interface
 
Metaprogramming in Scala 2.10, Eugene Burmako,
Metaprogramming  in Scala 2.10, Eugene Burmako, Metaprogramming  in Scala 2.10, Eugene Burmako,
Metaprogramming in Scala 2.10, Eugene Burmako,
 
Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1Objectorientedprogrammingmodel1
Objectorientedprogrammingmodel1
 
Sliderfns
SliderfnsSliderfns
Sliderfns
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
Article link httpiveybusinessjournal.compublicationmanaging-.docx
Article link httpiveybusinessjournal.compublicationmanaging-.docxArticle link httpiveybusinessjournal.compublicationmanaging-.docx
Article link httpiveybusinessjournal.compublicationmanaging-.docx
 
tutorialSCE
tutorialSCEtutorialSCE
tutorialSCE
 
Android Application Development - Level 2
Android Application Development - Level 2Android Application Development - Level 2
Android Application Development - Level 2
 
ContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docxContentsCOSC 2436 – LAB4TITLE .............................docx
ContentsCOSC 2436 – LAB4TITLE .............................docx
 
ConcordanceProject
ConcordanceProjectConcordanceProject
ConcordanceProject
 
skintutorial
skintutorialskintutorial
skintutorial
 
skintutorial
skintutorialskintutorial
skintutorial
 
Serialization in .NET
Serialization in .NETSerialization in .NET
Serialization in .NET
 
MSc dissertation np
MSc dissertation npMSc dissertation np
MSc dissertation np
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
1 Project 2 Introduction - the SeaPort Project seri.docx
1  Project 2 Introduction - the SeaPort Project seri.docx1  Project 2 Introduction - the SeaPort Project seri.docx
1 Project 2 Introduction - the SeaPort Project seri.docx
 

More from David Harrison

PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfDavid Harrison
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfDavid Harrison
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfDavid Harrison
 
PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfDavid Harrison
 
Generation_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfGeneration_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfDavid Harrison
 
Flavours - Classic/Technical BDD
Flavours - Classic/Technical BDDFlavours - Classic/Technical BDD
Flavours - Classic/Technical BDDDavid Harrison
 
Babble article - Test Automation & Text Translation
Babble article - Test Automation & Text TranslationBabble article - Test Automation & Text Translation
Babble article - Test Automation & Text TranslationDavid Harrison
 
Selenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedSelenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedDavid Harrison
 
Workflow Test Automation
Workflow Test AutomationWorkflow Test Automation
Workflow Test AutomationDavid Harrison
 
Et sensus agile documentation
Et sensus   agile documentationEt sensus   agile documentation
Et sensus agile documentationDavid Harrison
 

More from David Harrison (17)

PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdf
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
PagesToGo.pdf
PagesToGo.pdfPagesToGo.pdf
PagesToGo.pdf
 
IntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdfIntoTheNebulaArticle.pdf
IntoTheNebulaArticle.pdf
 
PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdf
 
Generation_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfGeneration_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdf
 
Test data article
Test data articleTest data article
Test data article
 
Flavours - Classic/Technical BDD
Flavours - Classic/Technical BDDFlavours - Classic/Technical BDD
Flavours - Classic/Technical BDD
 
Babble article - Test Automation & Text Translation
Babble article - Test Automation & Text TranslationBabble article - Test Automation & Text Translation
Babble article - Test Automation & Text Translation
 
Bdd Show and Tell
Bdd Show and TellBdd Show and Tell
Bdd Show and Tell
 
UI Testing Pattern
UI Testing PatternUI Testing Pattern
UI Testing Pattern
 
Soap ui automation
Soap ui automationSoap ui automation
Soap ui automation
 
High sierra part 1
High sierra part 1High sierra part 1
High sierra part 1
 
Selenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedSelenium Testing @ Agile Speed
Selenium Testing @ Agile Speed
 
Workflow Test Automation
Workflow Test AutomationWorkflow Test Automation
Workflow Test Automation
 
Et sensus agile documentation
Et sensus   agile documentationEt sensus   agile documentation
Et sensus agile documentation
 
Web Test Automation
Web Test AutomationWeb Test Automation
Web Test Automation
 

Recently uploaded

VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 

Recently uploaded (20)

VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 

SchemaStudioTypeLandscape_Article.pdf

  • 1. TYPE LANDSCAPES Discovering type dependencies with Schema Studio D. Harrison January 2024 © 2024, David Harrison, All Rights Reserved
  • 2. 2 CONTENTS INTRODUCTION........................................................................... 3 LANDSCAPE DISCOVERY............................................................... 3 AN EXAMPLE ............................................................................... 4 SCHEMA STUDIO IMPLEMENTATION............................................... 8 SUMMARY................................................................................. 12
  • 3. 3 INTRODUCTION In an earlier article1 the broad notion of the generation of a type being related to a landscape of dependent types, was introduced. Additionally, in the related articles in the “Xsd Generation” series2, the application Schema Studio was shown in the context of the overall W3C schema to strong type generation process. In a yet more recent article3, where the central topic was the current refactoring of the processor which forms the central “engine” of Schema Studio, we delved a little deeper into the type landscape. Having shown the base generated form of the Open Travel Alliance message definition represented by OTA_PingRQ (arguably the simplest message in the Open Travel message ecosystem), the “next step” was touched upon. This involved taking the much more complex OTA_CancelRQ as the source for further refactoring of the processor codebase. As before, for simplicity, we will be taking schema examples from the Open Travel Alliance4 set as a basis for our journey. LANDSCAPE DISCOVERY In the earlier discussion3 about generating the Open Travel type OTA_CancelRQ , we set out the range of types that would need to be to hand in order have a working class representing the message OTA_CancelRQ. The identification of these dependent types was a manual, tedious and error-prone process. It is the focus of this article to show the refactoring of the Schema Studio application itself aiming to provide an automated way of generating a type dependency tree for any selected top-level item. The process of discovery is not along the lines adopted for the first pass of the processor, walking the schema in detail and building a so-called Structure Element repository. Instead, we take the top-level item and recursively drill down from this as the root looking for manifest types, thus building a tree of type names at the different levels It is the types thus identified that must necessarily be generated to support the execution (and testing) of the specified top-level item. 1 Generation_XSD_Article.docx (slideshare.net) 2 Generation_XSD_Article - Part 2.pdf (slideshare.net) 3 Processor Refactoring.pdf (slideshare.net) 4 OpenTravel | OpenTravel
  • 4. 4 AN EXAMPLE To get a clear picture of how this new functionality works, let us take the case of SourceType (defined in OTA_CommonTypes.xsd), a definitional structure present in the top-level message OTA_CancelRQ, a component part of the type POS_Type: OTA_Cancel_RQ POS_Type
  • 5. 5 SourceType Where, in the last figure, only a part of the definition is shown as it is given in OTA_CommonTypes.xsd. In the specific top-level type SourceType, the dependent types, those that need to be available in order to construct this strong type, form a tree-like structure, the individual nodes of which can be represented by the following pattern root-type-name inner-type-name … Thus, walking through the XSD structure, by hand, the tree looks as shown below: SourceType (OTA_CommonTypes (OTA_CommonTypes.xsd) UniqueID_Type (referenced in: OTA_CommonTypes) CompanyNameType (referenced in: OTA_CommonTypes) StringLength0to128 (defined in: OTA_SimpleTypes.xsd) CompanuID_AttributesGroup (referenced in: OTA_CommonTypes) StringLength1to32 (defined in: OTA_SimpleTypes.xsd) OTA_CodeType (referenced in: OTA_SimpleTypes.xsd) xs:string (W3cPrimitives)
  • 6. 6 StringLength1to16 (referenced in: OTA_SimpleTypes.xsd) StringLength1to32 (referenced in: OTA_SimpleTypes.xsd) ISO3166 (referenced in: OTA_SimpleTypes.xsd) xs:string (W3cPrimitive) StringLength1to32 (referenced in: OTA_SimpleTypes.xsd) StringLength1to32 (referenced in: OTA_SimpleTypes.xsd) TPA_Extensions (referenced in: OTA_CommonTypes.xsd) TPA_ExtensionsType (defined in: OTA_CommonTypes.xsd) UniqueID_Group (referenced in: OTA_CommonTypes.xsd) xs:anyURI (W3cPrimitives) OTA_CodeType (referenced in: OTA_CommonTypes.xsd) xs:string (W3cPrimitive) StringLength1to32 (referenced in: OTA_CommonTypes.xsd) StringLength1to32 (referenced in: OTA_CommonTypes.xsd) StringLength1to32 (referenced in: OTA_CommonTypes.xsd) StringLength1to16 (referenced in: OTA_CommonTypes.xsd) StringLength1to64 (referenced in: OTA_CommonTypes.xsd) PositionGroup (referenced in: OTA_CommonTypes.xsd) StringLength1to16 (referenced in: OTA_CommonTypes.xsd) StringLength1to16 (referenced in: OTA_CommonTypes.xsd) StringLength1to16 (referenced in: OTA_CommonTypes.xsd) OTA_CodeType (referenced in: OTA_SimpleTypes.xsd) xs:string (W3cPrimitives) OTA_CodeType (referenced in: OTA_SimpleTypes.xsd) xs:string (W3cPrimitives) CompanyNameType (defined in: OTA_CommonTypes.xsd) StringLength0to128 (defined in: OTA_SimpleTypes.xsd) CompanyID_AttributesGroup (referenced in: OTA_CommonTypes.xsd) StringLength1to32 (defined in: OTA_SimpleTypes.xsd) OTA_CodeType (referenced in: OTA_SimpleTypes.xsd) xs:string (W3cPrimitives) StringLength1to16 (defined in: OTA_SimpleTypes.xsd) StringLength1to32 (defined in: OTA_SimpleTypes.xsd) ISO3166 (referenced in: OTA_CommonTypes.xsd) xs:string (W3cPrimitives) StringLength1to32 (defined in: OTA_SimpleTypes.xsd) StringLength1to32 (defined in: OTA_SimpleTypes.xsd) TPA_Extensions (referenced in: OTA_CommonTypes) TPA_ExtensionsType (defined in: OTA_CommonTypes.xsd) BookingChannelGoup (referenced in: OTA_CommonTypes) OTA_ CodeType (referenced in OTA_SimpleTypes.xsd) xs:string (W3cPrimitives) xs:Boolean (W3cPrimitives) TPA_Extensions (referenced in: OTA_CommonTypes) TPA_ExtensionsType (defined in: OTA_CommonTypes.xsd) StringLength1to16 (referenced in: OTA_SimpleTypes.xsd) StringLength1to16 (referenced in: OTA_SimpleTypes.xsd) ISO3166 (referenced in: OTA_SimpleTypes.xsd) xs:string (W3cPrimitives) AlphaLength3 (referenced in: OTA_SimpleTypes.xsd) StringLength1to16 (referenced in: OTA_SimpleTypes.xsd) UpperCaseAlphaNumericLength2to3 (referenced in: OTA_SimpleTypes.xsd) UpperCaseAlphaNumericLength3to5 (referenced in: OTA_SimpleTypes.xsd) StringLength3 (referenced in: OTA_SimpleTypes.xsd) StringLength1to16 (referenced in: OTA_SimpleTypes.xsd) StringLength1to32 (referenced in: OTA_SimpleTypes.xsd) The structure above contains a range of repeated types, such as StringLength1to16, OTA_CodeType and TPA_Extensions. In addition, the structure contains the W3c primitives, such as xs:boolean and xs:string, these having concrete implementations named W3cBoolean and W3cString, respectively, in the type landscape within the scope of Schema Studio.
  • 7. 7 The types specified in SourceType can be found either in OTA_CommonTypes.xsd, or any of the “include” files, OTA_SimpleTypes.xsd or OTA_Lists.xsd. The discovery algorithm needs to take account of this possibility and move through the changing “include” landscape when a named type cannot be found in the schema currently in scope. It is the types shown in this diagram that need to have their equivalent strong type generated and available, to fully build (and test) the single part of OTA_CancelRQ, SourceType. Having such a dependency list, related to any top-level type of interest, the user of Schema Studio can optimise the work of code generation. Rather than generate all the types defined in a schema set or silo, it is now possible to be more efficient. In practice, this need to be selective of types when performing a generation step might be as a response to changes within individual schemas, in which case many of the dependent strong types will already exist in the scope of a development process. However, the above diagram was a result of manually walking the type of interest and drilling down until a “leaf” type was reached. This is a tedious and error-prone process. Schema Studio, thankfully, has the functionality to produce this type landscape for us.
  • 8. 8 Schema Studio Implementation The main view of Schema Studio is as shown below with the appropriate Open Travel schema set loaded, the silo, “general”, open and SourceType selected in the main schema/type tree view. In addition, the context menu is open on the type node and here we see the operational possibilities available, one of which is “Generate Type View”. On the right-hand panel of the view shown below, for convenience, the XSD view of the type is displayed, achieved by double-clicking the selected item in the left hand tree view. If this “Generate Type View” option is selected then a form is shown which displays the corresponding type landscape:
  • 9. 9 In this panel view, the landscape, as in our manual diagram, is shown as a tree with each node having a checkbox. This allows the user to record which types have been generated. The panel also has a button which allows the tree view to be fully expanded (as in the above view). Additionally, the user can signal that all child nodes are to be checked, via the “Auto check child nodes” checkbox. When checked, and the “UniqueD_Type” tree node checkbox is checked (and “expand all” is checked):
  • 10. 10 The diagram can be saved and re-loaded via the buttons on the right hand panel. It should be noted that the W3c primitive types such as “xs:boolean” and “xs:string” have concrete strong types within the scope of Schema Studio (separate library), being represented as W3cBoolean and W3cString. The saved form is XML, and in the case of SourceType, has the content shown in the following fragment:
  • 11. 11 As can be seen, each of the nodes also records the checkbox state. This file is saved to a specific named folder in the same place as the corresponding schema silo and specialised by the type name, e.g.: C:...OpenTravelOTAV2014BgeneralTypeLandscapesSourceType-TypeLandscape.xml
  • 12. 12 Summary The foregoing has presented a mechanism in Schema Studio which allows the landscape of types, needed to satisfy the build-time requirements for any top- level type, to be established. The user can easily interact with the type landscape view and record what types have been generated, saving and loading the diagram as generation proceeds.