publish-xsd

Introduction

Generates an XML schema for the data model.

Requires that dotnet is installed.

Command Line Arguments

Required inputs for the publish-xsd command (must be specified in order).

  • [CogsLocation]

    The location of the folder containing the model.

  • [TargetLocation]

    The location of the folder where the output will be created.

Command Line Flags

Optional inputs for the publish-xsd command.

  • -?|-h|--help

    Displays all possible command arguments and flags for the publish-xsd command.

  • -o|--overwrite

    If the [TargetLocation] is not empty, erase all files in the folder before generation.

  • -n|--namespace

    Allows the user to specify the XMI of the desired XML namespace.

  • -p|--prefix

    Allows the user to specify the prefix for the XML namespace.

Command Line Usage

Format

$ publish-xsd (-h) (-o) (-n [namespace]) (-p [prefix]) [CogsLocation] [TargetLocation]

Examples

A few examples of how the command line arguments and flags can be used together.

$ publish-xsd -h
$ publish-xsd MyCogsModelDirectory MyOutputDirectory
$ publish-xsd -o MyCogsModelDirectory MyOutputDirectory
$ publish-xsd -n http://example.org/cogs -p cogs -o MyCogsModelDirectory MyOutputDirectory

Primitive Type Mappings to XML

Primitive Type XML representation
AnyURI anyURI
Boolean boolean
CogsDate Union of date, dateTime, duration, gYear, and gYearMonth primitive types.
Date date
DateTime dateTime
Decimal decimal
Double double
Duration duration
Float float
GDay gDay
GMonth gMonth
GMonthDay gMonthDay
GYear gYear
GYearMonth gYearMonth
Int int
Integer integer
Language language
Long long
NegativeInteger negativeInteger
NonNegativeInteger nonNegativeInteger
NonPositiveInteger nonPositiveInteger
PositiveInteger positiveInteger
String string
Time time
UnsignedLong unsignedLong