[dsdl-discuss] Re: What is the best way to simulate

From: Martin Bryan <martin@is-thought.co.uk>
Date: Thu Aug 17 2006 - 19:37:33 UTC

Rick

I'm confused (not an unusual situation I know!). Why is SimpleLiteral based
on anyType rather than being a simple string? Are you expecting someone to
want to extend these definitions by specifying a specific type, such as
xsd:date for the date element? What other DC elements would need typing?

Martin

----- Original Message -----
From: "Rick Jelliffe" <rjelliffe@allette.com.au>
To: <dsdl-discuss@dsdl.org>
Sent: Thursday, August 17, 2006 3:40 PM
Subject: [dsdl-discuss] Re: What is the best way to simulate

Just as a little progress report on my XSD to RNG converter, here is the
MS Dublin core schema in its XSD version and in the RELAX NG version (I
use Trang to convert it from RNG to RNC.)

Cheers
Rick

# -----------------------------------------------------------------

<xs:schema targetNamespace="http://purl.org/dc/elements/1.1/"
elementFormDefault="qualified" attributeFormDefault="unqualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.org/dc/elements/1.1/"
xmlns:odoc="http://schemas.microsoft.com/office/internal/2005/internalDocume
ntation">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" />
  <xs:complexType name="SimpleLiteral">
    <xs:complexContent mixed="true">
      <xs:restriction base="xs:anyType">
        <xs:sequence>
          <xs:any processContents="lax" minOccurs="0" maxOccurs="0" />
        </xs:sequence>
        <xs:attribute ref="xml:lang" use="optional" />
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="any" type="SimpleLiteral" abstract="true" />
  <xs:element name="title" substitutionGroup="any" />
  <xs:element name="creator" substitutionGroup="any" />
  <xs:element name="subject" substitutionGroup="any" />
  <xs:element name="description" substitutionGroup="any" />
  <xs:element name="publisher" substitutionGroup="any" />
  <xs:element name="contributor" substitutionGroup="any" />
  <xs:element name="date" substitutionGroup="any" />
  <xs:element name="type" substitutionGroup="any" />
  <xs:element name="format" substitutionGroup="any" />
  <xs:element name="identifier" substitutionGroup="any" />
  <xs:element name="source" substitutionGroup="any" />
  <xs:element name="language" substitutionGroup="any" />
  <xs:element name="relation" substitutionGroup="any" />
  <xs:element name="coverage" substitutionGroup="any" />
  <xs:element name="rights" substitutionGroup="any" />
  <xs:group name="elementsGroup">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="any" />
      </xs:choice>
    </xs:sequence>
  </xs:group>
  <xs:complexType name="elementContainer">
    <xs:choice>
      <xs:group ref="elementsGroup" />
    </xs:choice>
  </xs:complexType>
</xs:schema>

# -----------------------------------------------------------------

default namespace = "http://purl.org/dc/elements/1.1/"
namespace fn = "http://www.w3.org/2006/xpath-functions"
namespace odoc =
  "http://schemas.microsoft.com/office/internal/2005/internalDocumentation"
namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace xs = "http://www.w3.org/2001/XMLSchema"
namespace xsd = "http://www.w3.org/2001/XMLSchema"

# RELAX NG full schema
# Converted by Topologi Schema Evolution Utility
start =
  title
  | creator
  | subject
  | description
  | publisher
  | contributor
  | date
  | type
  | format
  | identifier
  | source
  | language
  | relation
  | coverage
  | rights
SimpleLiteral = text
any |= notAllowed
any |=
  # For substitutions
  element title { SimpleLiteral }
title =
  # For references
  element title { SimpleLiteral }
any |=
  # For substitutions
  element creator { SimpleLiteral }
creator =
  # For references
  element creator { SimpleLiteral }
any |=
  # For substitutions
  element subject { SimpleLiteral }
subject =
  # For references
  element subject { SimpleLiteral }
any |=
  # For substitutions
  element description { SimpleLiteral }
description =
  # For references
  element description { SimpleLiteral }
any |=
  # For substitutions
  element publisher { SimpleLiteral }
publisher =
  # For references
  element publisher { SimpleLiteral }
any |=
  # For substitutions
  element contributor { SimpleLiteral }
contributor =
  # For references
  element contributor { SimpleLiteral }
any |=
  # For substitutions
  element date { SimpleLiteral }
date =
  # For references
  element date { SimpleLiteral }
any |=
  # For substitutions
  element type { SimpleLiteral }
type =
  # For references
  element type { SimpleLiteral }
any |=
  # For substitutions
  element format { SimpleLiteral }
format =
  # For references
  element format { SimpleLiteral }
any |=
  # For substitutions
  element identifier { SimpleLiteral }
identifier =
  # For references
  element identifier { SimpleLiteral }
any |=
  # For substitutions
  element source { SimpleLiteral }
source =
  # For references
  element source { SimpleLiteral }
any |=
  # For substitutions
  element language { SimpleLiteral }
language =
  # For references
  element language { SimpleLiteral }
any |=
  # For substitutions
  element relation { SimpleLiteral }
relation =
  # For references
  element relation { SimpleLiteral }
any |=
  # For substitutions
  element coverage { SimpleLiteral }
coverage =
  # For references
  element coverage { SimpleLiteral }
any |=
  # For substitutions
  element rights { SimpleLiteral }
rights =
  # For references
  element rights { SimpleLiteral }
elementsGroup = (any)*
elementContainer = elementsGroup
BUILT_IN_ANY_TYPE =
  (element * { BUILT_IN_ANY_TYPE }
   | attribute * { text }
   | text)*

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Thu Aug 17 21:38:56 2006

This archive was generated by hypermail 2.1.8 : Fri Aug 18 2006 - 16:38:06 UTC