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. Advertising

  2. Hi Carsten,

    On Wed, 13 Jan 2010 00:46:14 -0800 (PST)
    Carsten Witte <> wrote:

    > I'm looking for a way to include name and version of the editor/tool
    > that generated the XML file into the file itself.
    >
    > but of course if there would be a standardized way/tag/attribute, I
    > would prefer to use that one.


    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. Advertising

  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. On Jan 13, 2:44 pm, Joe Kesselman <>
    wrote:
    > 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.


    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. Susanne Wunsch schrieb:
    > <dct:hasVersion>0.1</dct:hasVersion>


    <http://dublincore.org/documents/dcmi-terms/#terms-hasVersion>:

    This term is intended to be used with non-literal values as defined in
    the DCMI Abstract Model (http://dublincore.org/documents/abstract-model/).

    "0.1" is a literal value. So dct:hasVersion is inappropriate for version
    _numbers_.

    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
    Johannes Koch, Jan 13, 2010
    #5
  6. Hi Johannes,

    Thanks for the comment.

    On Wed, 13 Jan 2010 17:22:32 +0100
    Johannes Koch <> wrote:

    > Susanne Wunsch schrieb:
    > > <dct:hasVersion>0.1</dct:hasVersion>

    >
    > <http://dublincore.org/documents/dcmi-terms/#terms-hasVersion>:
    >
    > This term is intended to be used with non-literal values as defined in
    > the DCMI Abstract Model (http://dublincore.org/documents/abstract-model/).


    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. Susanne Wunsch schrieb:
    > Hi Johannes,
    >
    > Thanks for the comment.
    >
    > On Wed, 13 Jan 2010 17:22:32 +0100
    > Johannes Koch <> wrote:
    >
    >> Susanne Wunsch schrieb:
    >>> <dct:hasVersion>0.1</dct:hasVersion>

    >> <http://dublincore.org/documents/dcmi-terms/#terms-hasVersion>:
    >>
    >> This term is intended to be used with non-literal values as defined in
    >> the DCMI Abstract Model (http://dublincore.org/documents/abstract-model/).

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


    I don't understand.

    > 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?


    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
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
    Johannes Koch, Jan 14, 2010
    #7
  8. Carsten Witte

    Peter Flynn Guest

    Joe Kesselman wrote:
    > 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.


    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert M. Gary

    Ant build.xml file generator/creator

    Robert M. Gary, Mar 18, 2005, in forum: Java
    Replies:
    1
    Views:
    1,391
    M van Leeuwen
    Mar 23, 2005
  2. edw
    Replies:
    2
    Views:
    9,443
  3. mark4asp
    Replies:
    2
    Views:
    2,198
    Harry Haller
    Nov 7, 2006
  4. Ultrus
    Replies:
    3
    Views:
    365
    Stefan Behnel
    Jul 9, 2007
  5. Replies:
    6
    Views:
    430
    Peter Flynn
    Dec 20, 2008
Loading...

Share This Page