# Presentation: 215437

## Managing Namespaces in XML With Metadata Registries

- Judith Newton
- NIST
- _[jnewton@nist.gov](mailto:jnewton@nist.gov)_
- XML Registry Project Team Meeting,
- May 21, 2003

## Agenda

- Namespaces as metadata
- Introduction to an ISO 11179-based metadata registry (MDR) model
- Naming in the MDR
- How an MDR can complement an XML registry

## What is Metadata?

- A type of data that describes and defines other data
- Content, quality and condition
- Who owns it? How was it collected? How current is it?
- How many names is it known by?

## Functional Namespaces

- Traditionally, data managers have divided up an enterprise’s metadata by subject area or stewardship domain
- Business rules have been applied to these namespaces
- Intermixing happens: Person metadata used by Human Resources, Customer Service, etc.

## Previous External Namespace Arrangements

- One-to-one agreements
- Small groups of like-minded folks
- By fiat, like Wal-mart

## External Namespaces

- Communities of Interest are driving creation of namespaces
- Common schema development for subject areas
- Examples: ebXML (OASIS), mathML, eCommerce (BizTalk)

## Namespaces From Information Architecture 

- Namespaces From Information Architecture

## Data    Model

-   LOCATION

- PERSON

- ADDRESS

- GEOGRAPHIC

- EMPLOYEE

- CUSTOMER

- Latitude
- Longitude
- Altitude

- Street
- County
- City
- Country

- Name
- Position

- Name
- Order History

## Good Practices for Namespace Management: Tools

- Data Model
- Classification of Terms: Ontology, taxonomy, glossary, keywords
- Metadata Repository or Registry
- XML Schemas

## Good Practices for Namespace Management: Process

- Appoint data stewards
- Publish the semantic content of tools
- Build bridges
- Specify change mechanisms

## Good Practices for Namespace Management: Goals

- Understandability - Users should readily comprehend the data and metadata, both structurally and semantically
- Trustworthiness - The metadata should document the source, collection method, security level, and other factors so users can assess the authority of the data
- Interoperability - Enough information must be provided to users concerning interfaces, whether formalized or ad-hoc (or just potential)

## Example of Namespace Derivation Structure

- Proposed scheme for establishing namespaces for the U.S. government: Namespaces organized by subsetting the dot-gov domain into smaller units by agency, for example:
- urn:us:gov:gsa
- In a schema, gsa would be identified by a namespace prefix:
- <?xml version=“1.0” encoding=“UTF-8”?>
- <xsd:schema xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
- xmlns:gsa=“urn:us:gov:gsa”

## Example of Namespace Prefix in an XML Instance Document

- Examples of instances qualified by the "gsa" prefix:
- <gsa:AgencyName>GSA</gsa:AgencyName>
- <gsa:AgencyID>9986</gsa:AgencyID>
- <gsa:ContactPartyID>222345897</gsa:ContactPartyID>
- <gsa:OrderedQuantity>100</gsa:OrderedQuantity>
- <gsa:OrderedQuantityAmount>399</gsa:OrderedQuantityAmount>

## XML Technical Namespace Definition

- The XML Recommendation defines a Namespace as a conceptual space in which all names are unique.
- Namespace becomes a mechanism to distinguish among meanings of terms, for instance “bar” in the legal sense and “bar” in the fence-manufacturing community.
- In an XML Schema, an IRI is used to define the namespace.  The IRI may not resolve to any actual content.

## Agenda

- Namespaces as metadata
- Introduction to an ISO 11179-based metadata registry (MDR) model
- Naming in the MDR
- How an MDR can complement an XML registry

##                    SC 32 Data Management and Interchange 

**          ****Meta Data Registry Projects**
- ISO/IEC 11179 Metadata Registries, Parts 1-6:
- 	Framework
- 	Classification
- 	Registry metamodel and basic attributes
- 	Formulation of data definitions
- 	Naming & identification principles
- 	Registration
- ISO/IEC TR 20943-1, Procedures for achieving MDR content consistency-Data elements to be published any day now
- ISO/IEC TR 15452, Specification of Data Value Domains, published in 2000.  To be replaced by:
- ISO/IEC FDTR 20943-3, Procedures for achieving MDR content consistency- Value Domains
- ISO/IEC 20944 series – API’s and other interfaces

## High-level Metamodel

- Value_Domain

- Conceptual_Domain

- Data_Element

- Data_Element_Concept

**Value_Domain**
- Name: *English-Language*
*            **Country Short Name*

**Conceptual_Domain**
- Name:* Country*

- Data_Element

**Data_Element_Concept**
- Name:*Country Identifier*

- Administered Item Naming Example

## Slide 19

## Slide 20

## Slide 21

## XML Name

## Slide 23

## Agenda

- Namespaces as metadata
- Introduction to an ISO 11179-based metadata registry (MDR) model
- Naming in the MDR
- How an MDR can complement an XML registry

## Names

- Names are associated with contexts within the MDR
- Namespaces may be contexts or classifications
- XML contexts may be namespaces, DTD’s, schemas or other structures
- Other context examples include application systems, programming languages, report headers

## Structured Names

- Scope
- Authority
- Semantic rules
- Syntactic rules
- Lexical rules
- Uniqueness rule

## Semantic Content of Names

- Semantic rules enable meaning to be conveyed
- Principle: Name parts are meaningful to users
- Name parts are derived from structure sets that identify relationships among (classify) members

## Syntax of Names

-    Syntax specifies the arrangement of parts within a name
- Principle: The name parts are arranged in a specified order
- The arrangement may be relative or absolute, or some combination of the two

## Lexical Considerations of Names

-    These concern the preferred and derogated terms, synonyms, abbreviations, part length, spelling, character set, case sensitivity, etc.
- Principle: All names governed by a specific naming convention have a consistent appearance
- Control word form and vocabulary

## Agenda

- Namespaces as metadata
- Introduction to an ISO 11179-based metadata registry (MDR) model
- Naming in the MDR
- How an MDR can complement an XML registry

## Lexical Rules for XML Context

- Lexical rules:
- Nouns are used in singular form only.  Verbs (if any) are in the present tense.
- Name parts are separated by capitalizing the first character of the second thru *n*th word
- All words in the name are in mixed case.
- Abbreviations, acronyms, and initialisms are allowed.
-       		Example: CountryMailingAddressName

## 11179 - XML Collaboration

**<?xml version="1.0"?>**
**                 ****<shipTo >**
**                     ****<name>Alice Wilson</name>**
**                     ****<street>161 North Street</street>**
**                     ****<city>Happy Valley</city>**
**                     ****<state>MO</state>**
**                     ****<zip>63105</zip>**
**                     ****<country code>USA</country code>**
**	****	**
**                 ****</shipTo>**

## The Need for XML Name Management

- XML provides a common information exchange format without common semantics
- Each community of interest is defining their own namespaces
- How can the process be standardized?
- How can we address the data warehouse problem of semantic integrity?

## XML Name Management Using MDR Registries

- An MDR metadata registry can link the XML syntax to common semantic content
- XML namespaces can be defined as contexts or classifications within MDR registries
- Names can be defined within and among namespaces
- Naming convention principles can be applied to XML names

## XML Name Management Using 11179 Naming Conventions

- Part 5 of ISO/IEC 11179 addresses naming conventions developed using a set of principles
- These principles can be applied to XML names
- ebXML has already produced a draft standard:*ebXML Core Components Dictionary Entry Naming Conventions* at
-      http://www.ebxml.org/specs/index.htm

## Summary

- XML names defined as contexts in MDR
- IDI links XML schema objects to MDR registry entries (not just for names but other semantic information as well)
- XML naming conventions defined in MDR registry
- Adapt 11179-5 naming principles to XML naming conventions

## The final version of 11179-3:2003 is now available to download.

- 1. Go to www.jtc1.org
- 2. Select “Freely Available Standards” at the bottom of the left column
- 3. In LiveLink Go to the Public areas
- 4. Scroll to 11179-3