Creator information within the XML itself

C

Carsten Witte

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
 
S

Susanne Wunsch

Hi Carsten,

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
 
J

Joe Kesselman

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."
 
C

Carsten Witte

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
 
S

Susanne Wunsch

Hi Johannes,

Thanks for the comment.

<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:[email protected],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
 
J

Johannes Koch

Susanne said:
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?

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:[email protected],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>
 
P

Peter Flynn

Joe said:
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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top