Creator information within the XML itself

Discussion in 'XML' started by Carsten Witte, Jan 13, 2010.

  1. Hi all,

    already checked quite some FAQ here and at 3WC, but either there is no
    information or I'm reading it wrong. I'm looking for a way to include
    name and version of the editor/tool that generated the XML file into
    the file itself. I'm aware, that I could come up with something like:

    <creator tool="mycrap.exe" version="0.1" />

    but of course if there would be a standardized way/tag/attribute, I
    would prefer to use that one.

    TIA, Carsten
     
    Carsten Witte, Jan 13, 2010
    #1
    1. Advertisements

  2. Hi Carsten,

    How about Dublin Core Elements?

    <dc:creator>mycrap.exe</dc:creator>
    <dct:hasVersion>0.1</dct:hasVersion>

    With full namespace declarations, providing full validation:

    <dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/elements/1.1/ http://dublincore.org/schemas/xmls/qdc/dc.xsd">mycrap.exe</dc:creator>

    <dct:hasVersion xmlns:dct="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/dc/terms/ http://dublincore.org/schemas/xmls/qdc/dcterms.xsd">0.1</dct:hasVersion>

    If 'xsi' namespace is already declared in root element: remove it.

    Good luck...
    Susanne Wunsch
     
    Susanne Wunsch, Jan 13, 2010
    #2
    1. Advertisements

  3. Of course that only works if the particular XML markup you're working
    with has defined a way to do it. If you're designing your own document,
    you can add that; if you're trying to work with someone else's schema or
    DTD you need to look at whether and how they've provided an authorship
    mechanism... Or you need to do what most tools do and put that in a
    comment rather than in the document content per se.

    --
    Joe Kesselman,
    http://www.love-song-productions.com/people/keshlam/index.html

    {} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
    /\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
     
    Joe Kesselman, Jan 13, 2010
    #3
  4. Since DC sounds promising and we own our XML documents, I think there
    is a way to include this into our specifications. With over 100 xml-
    files in the system and an growing multitude of tools to create them,
    it prove useful to have the information at hand in a standardized
    way...


    Thanx to both of you.
    /Carsten
     
    Carsten Witte, Jan 13, 2010
    #4
  5. Johannes Koch, Jan 13, 2010
    #5
  6. Hi Johannes,

    Thanks for the comment.

    That means, there is no possibility to describe the pure software
    version, than adding it into the 'creator'-tag?

    The other tag 'isVersionOf' also refines a 'relation'.

    Would some link be a 'non-literal value'?

    <dct:hasVersion>http://some.software.com/version/0.1<dct:hasVersion>

    or:

    <dct:hasVersion>tag:,2010-01-01:software/version/0.1</dct:hasVersion>

    Can you give an example, how to use 'hasVersion' correctly?

    Thanks for getting me onto the right track.

    Cheers...
    Susanne
     
    Susanne Wunsch, Jan 13, 2010
    #6
  7. I don't understand.
    The document <http://dublincore.org/documents/dc-xml-guidelines/>
    contains an example with another relation:

    ....
    <dcterms:isPartOf xsi:type="dcterms:URI">
    http://www.bath.ac.uk/
    </dcterms:isPartOf>
    ....

    So, probably

    <dct:hasVersion>http://some.software.com/version/0.1<dct:hasVersion>

    could be the way to describe a "has version" relation between two resources.

    In RDF/XML such a relation between uri_for_resource1 and
    uri_for_resource2 could look like this:

    <rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dct="http://purl.org/dc/terms/">
    <rdf:Description rdf:about="uri_for_resource1">
    <dct:hasVersion rdf:resource="uri_for_resource2"/>
    </rdf:Description>
    <rdf:Description rdf:about="uri_for_resource2">
    </rdf:Description>
    </rdf:RDF>
     
    Johannes Koch, Jan 14, 2010
    #7
  8. Carsten Witte

    Peter Flynn Guest

    The TEI provides for this kind of metadata; if DC doesn't provide the
    level of granularity you need, you can borrow the code from the TEI schemas.

    ///Peter
     
    Peter Flynn, Jan 17, 2010
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.