xml date/time

R

richard

Before you go suggesting an xml group, I did check them and none of them
appear to be all that active. At least not on my server.
Then which one of the hundred would be appropriate?

What is the proper way to include the date stamp?
I have been looking and can't seem to find any thing that clearly shows how
to do it.
 
N

Nik Coughlin

richard said:
Before you go suggesting an xml group, I did check them and none of them
appear to be all that active. At least not on my server.
Then which one of the hundred would be appropriate?

What is the proper way to include the date stamp?
I have been looking and can't seem to find any thing that clearly shows
how
to do it.

XML is just a way to describe data electonically in a textual format, it
doesn't define how you should format dates etc. The wikipedia page does a
good job explaining just what XML is and isn't:

http://en.wikipedia.org/wiki/XML

There are some *recommended* ways to do it however:

http://www.hackcraft.net/web/datetime/#xsd
http://posc.org/ebiz/pefxml/patternsobjects.html#date
 
A

Andy Dingley

Then which one of the hundred would be appropriate?
comp.text.xml

What is the proper way to include the date stamp?

XML is just a transport protocol, not an application. Although it's
widely thought that "anything written in XML can be read by anything
that understands XML", this is a misleading falsehood. XML is just
the starting point, you also need both parties to agree on a shared
vocabulary, which in XML terms would be the "schema".

If the schema has a property that needs date/time as a value domain,
then the schema will indicate how to encode this. If you don't follow
that, then things will break.

If you haven't yet selected a schema, then choose one. It's better to
adopt an existing and widely-used schema than it is to create a new
one. Even if you create the most perfect schema ever, the advantge
(for internet work) is in _communication_ between pre-existing and pre-
understood tools, not in creating new ones specific to your own
project. If you're looking at page metadata, then reading about
"Dublin Core" would be a very good start. If you want to embed
metadata into web pages, then RDFa or even Microformats might be
useful to learn about.


Now, how to represent date/time in XML. There are two ways, one is to
break down the components as separate XML nodes (i.e. element content
or attribute values), but this is needlessly verbose and very rarely
done these days. The other, far more widely used, is to represent
"date/time" as a single string and place that anywhere into yoru XML,
as either an element's content or an attribute's value. The "XML
format" problem now turns back into the old "date/time string format"
problem.

There are two popular solutions to this: RFC822 and ISO8601, which are
easily worked with and converted between, but are different. Both are
"widely used" (they're not going away anytime soon), but I'd suggest
ISO8601.

RFC822 is the older pre-web Internet format for date/time and it's
still used in email messages accordign to RFC822

ISO8601 is a newer "web era" format and is favoured by the W3C, thus
more widely used for web content.

Both of these follow the "generate precisely, consume flexibly"
approach. They're non-trivial formats and there are lots of aspects
you can use, but don't always have to. However anything that parses
them ought to understand the full format and deal with all the
complexities (any sensible langauge will already have parsing
routines, you don't need to write these).

Please indicate the timezone on all of your generated date/time
timestamps. It's a big world out there.

Learn the distinction between 00:00 UTC midnight and something that's
purely a date stamp, or that indicates "local midnight", regardless of
timezone. This makes integration of worldwide systems a lot easier, if
you're clear about it up-front.
 
J

Jan C. Faerber

Before you go suggesting an xml group, I did check them and none of them
appear to be all that active. At least not on my server.
Then which one of the hundred would be appropriate?

What is the proper way to include the date stamp?
I have been looking and can't seem to find any thing that clearly shows how
to do it.

In OOWriter I saved a file in DocBook (.xml) format.
Then your saved file starts with:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

On
http://www.oasis-open.org/home/index.php

I did a search with "time stamp":

http://search.oasis-open.org/_resul...utton.x=0&imageButton.y=0&imageButton=Go#1128
http://docs.oasis-open.org/dss/v1.0/oasis-dss-core-spec-v1.0-os.html#_Toc159076065

and found:

<quote src="http://docs.oasis-open.org/dss/v1.0/oasis-dss-core-spec-
v1.0-os.html#_Toc159076065">
The <AddTimestamp> element indicates that the client wishes the server
to embed a timestamp token as a property or attribute of the resultant
or the supplied signature.</quote>
 
R

richard

Before you go suggesting an xml group, I did check them and none of them
appear to be all that active. At least not on my server.
Then which one of the hundred would be appropriate?

What is the proper way to include the date stamp?
I have been looking and can't seem to find any thing that clearly shows how
to do it.


forget that. I found out how to do it in php much easier. using the date()
thingy.

http://1littleworld.net/code/date1.php
 
T

Travis Newbury

If it did, XML would be on-topic in every group you post in.
Bye bye asshole. *plonk*

Oh please Shemp don't plonk me... Noooooo I am melting.....
melting.... Whoa is me..... What a world... what a world.....
 
D

dorayme

Travis Newbury said:
Oh please Shemp don't plonk me... Noooooo I am melting.....
melting.... Whoa is me..... What a world... what a world.....

Hey! This is like the good old days, a bit of fire and spirit coming
back in. Subscribers rattling the keys to their killfiles, others
pretending to be unaffected (c'mon Travs, admit it, you are hurt to the
quick!)

I have said this before, being a keen student of Sherm's plonking
behaviour, he is a softie underneath and you will be out of there in no
time at all. <g>

God, what next? I know, Luigi will come back!
 
N

Neredbojias

If it did, XML would be on-topic in every group you post in.

Bye bye asshole. *plonk*

Ah, pay no attention to Travis. He can't help it; he was born that
way.
 
N

Neredbojias

Sigh. I guess I have to spell it out.

The level of activity in the the XML groups has no effect on whether
it's on-topic here or not. Thus, the fact that "none of them appear
to be all that active" is not a justification for posting an XML
question in this group.

Regardless of whether XML is on-topic here or not, my statement is
still true; it's not the amount of traffic in some other group that
decides its topicality.

Now, if XML is in fact on-topic here, I'd appreciate it if an adult
who's capable of communicating without name-calling and non sequitors
can refer me to an official group charter (or whatever) that says so.

Well, you're bound to be disappointed because I can think of no adult
here who fits those criteria. Maybe one of the new kids will woosh
forth unwobbley to fill this technical environmental niche.

Anyway, such questions used to be answered by
"allmyfaqs.net/faq.pl?Alt.html_FAQ" but I just got a dead link there.
(Perhaps that's why there're so many deadheads here..?) However,
another Google link in close proxinity led me to this:

Encouraged topics include:

* Any question pertaining the the use of HTML
* Discussion of W3C recommendations
* Design issues involved in authoring world wide web documents
* Request for a site critique (see below on how to get your site
critiqued) * Implementation issues involved in launching a website
* Issues involved in running a web site.

which is at: "http://www.html-faq.com/alt.html/?ontopic"
 
N

Neredbojias

That's pretty much what "*plonk*" means, right? :)

Er, I guess you're right, although back in the good old days when Ed
Mullen was middle-aged we used "plonk" to mean something considerably,
especially among males in barroom conversations.
 
N

Neredbojias

Sorry, my mistake! I forgot this is an alt.* group. :)

....And one packed with Australians, too!
Okay, that last "catch-all" bullet point leads me to think that XML,
at least when it's involved with a web site, is an acceptable topic
here. I stand corrected on that point - thank you for clarifying that
in a civil manner!

Aw, shucks, now I feel like the little boy who told the little girl
that her blouse had become unbuttoned.
 
T

Travis Newbury

Do you have a logical argument to make on behalf of XML's topicality
here, or is "nuh uh!" the best you can do?

No the best he can do it point you to the alt.html faq which state
that anything web is a valid topic in alt.html.

"alt.html is a Usenet newsgroup devoted to all aspects of website
design and development. It is a general mix of webmasters, coders,
artists and designers, and the group caters for all levels of website
development from the first personal webpage to the latest cutting-edge
fully accessible commercial websites."

Shemp, "all aspects" would include XML.

You really are obtuse...
 
T

Travis Newbury

Now, if XML is in fact on-topic here, I'd appreciate it if an adult
who's capable of communicating without name-calling and non sequitors
can refer me to an official group charter (or whatever) that says so.

So....
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top