1 / 15

Introduction to the NCIP DTDs and XML Schemas

Introduction to the NCIP DTDs and XML Schemas. Tony O’Brien Oct 2 nd 2002. DTD/XML Schema Basics. Linked to Implementation Profile 1 document Provide formal, unambiguous specification of NCIP message syntax Facilitate machine (& human) parsing of NCIP messages. NCIP has 4 of them!.

corbin
Download Presentation

Introduction to the NCIP DTDs and XML Schemas

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to the NCIP DTDs and XML Schemas Tony O’Brien Oct 2nd 2002

  2. DTD/XML Schema Basics • Linked to Implementation Profile 1 document • Provide formal, unambiguous specification of NCIP message syntax • Facilitate machine (& human) parsing of NCIP messages

  3. NCIP has 4 of them! • ncip_v1_0.dtd (main DTD) • ncip_v1_0.xsd (main Schema) • ncip_version.dtd (‘version’ DTD) • ncip_version.xsd (‘version’ Schema)

  4. Main NCIP DTD • ncip_v1_0.dtd • Contains main set of 88 NCIP messages • Must be supported by NCIP conformant applications • Uses “datatype” attribute to provide XML-Schema-like type information

  5. Main NCIP XML Schema • ncip_v1_0.xsd • Mirrors & is derived from main DTD • DTD datatype attributes converted into true XML Schema datatypes • Conformant apps do not currently need to support Schema • …but Schema will eventually replace DTD

  6. ‘Version’ DTD • ncip_version.dtd • Provides ‘NCIP versions supported’ info • Independent of main DTD • Implemented for NCIP v1.0 • ….but should remain in use as new versions of NCIP & the main DTD are developed

  7. ‘Version’ XML Schema • ncip_version.xsd • Mirrors & is derived from ‘version’ DTD

  8. Location of DTD/Schema files • Hosted by NISO • www.niso.org/ncip/v1_0/imp1/dtd/ncip_v1_0.dtd • www.niso.org/ncip/v1_0/imp1/dtd/ncip_version.dtd • www.niso.org/ncip/v1_0/imp1/xsd/ncip_v1_0.xsd • www.niso.org/ncip/v1_0/imp1/xsd/ncip_version.xsd

  9. Top Level Structure of main DTD & XML Schema • NCIPMessage is the root element • Consists of 1 ‘version’ attribute and 1 child element • Child element is a choice from 88 possible alternatives • 88 alternatives represent 44 initiation/response message pairs • These 44 ‘services’ can be further categorised:- • 4 ‘lookups’ eg. LookupUser/LookupUserResponse • 20 ‘updates’ eg. CheckOutItem/CheckOutItemResponse • 20 ‘notifications’ eg. ItemShipped/ItemShippedResponse

  10. Top Level Structure of ‘Version’ DTD/Schema • NCIPVersionMessage is the root element • Consists of 1 ‘version’ element and 1 child element • Child element is a choice from 2 alternatives • Ie. A single version lookup ‘service’ • LookupVersion/LookupVersionResponse

  11. Initiation Messages • Consist of an InitiationHeader element, followed by message-specific data • InitiationHeader contains:- • FromSystemId (s/v, optional) • FromSystemAuthentication (string, optional) • FromAgencyId (s/v, mandatory) • FromAgencyAuthentication (string, optional) • OnBehalfOfAgency (s/v, optional) • ToSystemId (s/v, optional) • ToAgencyId (s/v, mandatory) • ApplicationProfileType (s/v, optional)

  12. Response messages • Consist of a ResponseHeader, followed by:- • For Lookup and Update Messages: A Problem element, or response-specific data • For Notification Messages: A MessagingError element, or nothing at all • ResponseHeader contains:- • FromSystemId (s/v, optional) • FromSystemAuthentication (string, optional) • FromAgencyId (s/v, mandatory) • FromAgencyAuthentication (string, optional) • ToSystemId (s/v, optional) • ToAgencyId (s/v, mandatory)

  13. DTD/Schema data types • boolean • dateTime (ISO 8601) • integer • nonNegativeInteger • positiveInteger • string • ‘Wrapper’ elements

  14. Enumerated Types • Scheme/Value pairs • Provides namespace for enumerations • ‘Closed’: No new lists of values may be defined in a given protocol version • Example: General Processing Error • ‘Open’: New lists of values may be defined without breaking protocol • Example: Agency User Privilege Type • Nb. In all cases, lists specified by protocol must be supported by conformant apps

  15. Example Scheme/Value pair <AgencyUserPrivilegeType> <Scheme>http://www.niso.org/ncip/v1_0/imp1/schemes/ agencyuserprivilegetype/public.scm</Scheme> <Value>Adult</Value> </AgencyUserPrivilegeType> • Nb. A ‘Scheme’ element is always a URI • Guarantees globally unique list name • Does not guarantee presence of list at specified URI

More Related