On 1/13/06, Stephane Bortzmeyer <[EMAIL PROTECTED]> wrote:
> Anyone knows one? Before I start running Trang on the DTD here:

Well, I'm not sure there is one single representation of DC. If you're
interested in using it in the context of RDF, here's an example of how
I'm using it for thinking about how to integrate DC into
OpenDocument's metadata support.

namespace dc = "http://purl.org/dc/elements/1.1/";
namespace dcterms = "http://purl.org/dc/terms/";
namespace local = ""
namespace meta = "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
namespace odbib = "http://www.example.net/odbib#";
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";

dc:creator [ "Bruce D'Arcus" ]
dc:description [
  "This schema illustrates one possible way to support flexible but
integrated metadata in OpenDocument."
]

# This schema represents a contrained RDF/XML subset that offers:
#   1. base support for Dublin Core and some of Qualified Dublin Core
#   2. predictable extension

start = rdf.RDF

rdf.RDF = element rdf:RDF { (od.meta+ & rdf.resource*), xml.base? }

# The schema is designed in such a way that it is assumed each document metadata
# type would have its own dedicated file. Document metadata would be stored in
# a meta-document.xml file, bibliographic metadata in meta-bibliographic.xml,
# and so forth. Those applications which do not support processing of any given
# metadata type could simpy ignore it.
#
# The manifest file could indicate a given file was a metadata file by using
# the text/xml+rdf mediatype.
od.meta =
  element meta:Document { od.meta-properties }
  | element meta:BibliographicReference { od.meta-properties }+
  | element meta:Table { od.meta-properties }+
  | element meta:Chart { od.meta-properties }+
  | element meta:Figure { od.meta-properties }+

od.meta-properties =
  (dc.properties+ & (rdf.property | rdf.resource_property)*),
  rdf.id

## Dublin Core properties
div {
# we use RELAX NG's interleave feature to maintain an unodered content model
  dc.properties =
    dc.title+
    & dc.creator*
    & dc.subject*
    & dc.publisher?
    & dc.description*
    & dc.contributor*
    & dc.identifier*
    & dc.language?
    & dc.source?
    & dc.type*
    & dc.rights?
    & dc.format*
    & dc.coverage?
    & dcterms.created?
    & dcterms.isPartOf?
    & dcterms.hasPart*
    & dcterms.isVersionOf?
    & dcterms.hasVersion*
    & dcterms.references*
    & dcterms.replaces?
    & dcterms.modified?
    & dcterms.medium?
    & dcterms.spatial?
    & dcterms.issued?
    & dcterms.tableOfContents?
  dc.title = element dc:title { rdf.string_literal | rdf.xml_literal }
  dc.creator = element dc:creator { rdf.string_literal | rdf.URI }
  dc.contributor = element dc:contributor { rdf.string_literal | rdf.URI }
  dc.subject = element dc:subject { rdf.string_literal | rdf.URI }
  dc.publisher = element dc:publisher { rdf.string_literal | rdf.URI }
  dc.language = element dc:language { rdf.string_literal | rdf.URI }
  dc.description = element dc:description { rdf.string_literal |
rdf.xml_literal }
  dc.format = element dc:format { rdf.string_literal | rdf.URI }
  dc.identifier = element dc:identifier { rdf.string_literal | rdf.URI }
  dc.rights = element dc:rights { rdf.string_literal | rdf.URI }
  dc.source = element dc:source { rdf.URI }
  dc.type = element dc:type { rdf.string_literal | rdf.URI }
  dc.coverage = element dc:coverage { rdf.string_literal | rdf.URI }

  ## dcterms date qualifiers
  div {
    dcterms.modified = element dcterms:modified { date }
    dcterms.issued = element dcterms:issued { date }
    ## replacemenmt for meta:creation-date
    dcterms.created = element dcterms:created { date }
  }
  ## dcterms relations qualifiers
  div {
    dcterms.isPartOf = element dcterms:isPartOf {
rdf.resource_property | rdf.URI }
    dcterms.hasPart = element dcterms:hasPart { rdf.resource_property
| rdf.URI }
    dcterms.isVersionOf = element dcterms:isVersionOf {
rdf.resource_property | rdf.URI }
    dcterms.hasVersion = element dcterms:hasVersion {
rdf.resource_property | rdf.URI }
    dcterms.references = element dcterms.references {
rdf.resource_property | rdf.URI }
    dcterms.replaces = element dcterms.replaces {
rdf.resource_property | rdf.URI }
  }
  ## other dcterms qualifiers
  div {
    dcterms.medium = element dcterms:medium { rdf.string_literal | rdf.URI }
    dcterms.spatial = element dcterms:spatial { rdf.string_literal | rdf.URI }
    # if ODF was to support dcterms:tableOfContents, would need to be
better specified
    dcterms.tableOfContents = element dcterms:tableOfContents {
rdf.string_literal | rdf.URI }
  }
}

## generic RDF structures
div {

  ## attributes
  div {
    rdf.id = attribute rdf:about { xsd:anyURI }
    xml.language = attribute xml:lang { xsd:language }
    xml.base = attribute xml:base { xsd:anyURI }
  }

  ## basic RDF triple patterns
  div {
    # exclude non-namespaced content, as well as base OpenDocument
metadata properties
    rdf.resource =
      element * - (local:* | meta:*) { (rdf.property |
rdf.resource_property)+, rdf.id? }
    rdf.property =
      element * - (local:* | dc:* | dcterms:* | meta:*) { rdf.literals
| rdf.URI | rdf.sequence }
    rdf.sequence =
      element rdf:Seq {
        element rdf:li { rdf.URI | rdf.resource }+
      }
    rdf.URI = attribute rdf:resource { xsd:anyURI }
    rdf.resource_property =
      element * - (local:* | dc:* | dcterms:* | meta:*) { rdf.resource
| rdf.URI }
  }

  ## literals
  div {
    rdf.literals = rdf.string_literal | rdf.xml_literal
    rdf.string_literal = text, xml.language?
    rdf.xml_literal =
      any,
      attribute rdf:parseType { "Literal" }
  }
  any =
    mixed {
      element * - (local:* | dc:* | meta:*) {
        attribute * { text }*,
        any
      }*
    }
  date = xsd:date | xsd:gYear | xsd:gYearMonth
}


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/rng-users/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to