HighDots Forums  

xml date/time

alt.html alt.html


Discuss xml date/time in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
richard
 
Posts: n/a

Default xml date/time - 11-02-2009 , 01:09 AM






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.

Reply With Quote
  #2  
Old   
Nik Coughlin
 
Posts: n/a

Default Re: xml date/time - 11-02-2009 , 01:17 AM






"richard" <member (AT) newsguy (DOT) com> wrote

Quote:
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

Reply With Quote
  #3  
Old   
Andy Dingley
 
Posts: n/a

Default Re: xml date/time - 11-02-2009 , 06:23 AM



On 2 Nov, 06:09, richard <mem... (AT) newsguy (DOT) com> wrote:

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

Quote:
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.

Reply With Quote
  #4  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: xml date/time - 11-02-2009 , 09:21 AM



richard <member (AT) newsguy (DOT) com> writes:

Quote:
Before you go suggesting an xml group, I did check them and none of them
appear to be all that active.
That doesn't make XML on-topic here.

sherm--

Reply With Quote
  #5  
Old   
Jan C. Faerber
 
Posts: n/a

Default Re: xml date/time - 11-02-2009 , 11:40 AM



On Nov 2, 7:09*am, richard <mem... (AT) newsguy (DOT) com> wrote:
Quote:
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/_results.php?cx=014787424146443099038%3Ayatjcm7xws a&cof=FORID%3A11&q=time+stamp&imageButton.x=0&imag eButton.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>

Reply With Quote
  #6  
Old   
richard
 
Posts: n/a

Default Re: xml date/time - 11-02-2009 , 10:47 PM



On Sun, 1 Nov 2009 23:09:38 -0700, richard wrote:

Quote:
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

Reply With Quote
  #7  
Old   
Travis Newbury
 
Posts: n/a

Default Re: xml date/time - 11-03-2009 , 08:22 AM



On Nov 2, 9:21*am, Sherm Pendley <spamt... (AT) shermpendley (DOT) com> wrote:
Quote:
Before you go suggesting an xml group, I did check them and none of them
appear to be all that active.
That doesn't make XML on-topic here.
But being a dick does?

alt.html is for all things web, not just HTML

Reply With Quote
  #8  
Old   
Sherm Pendley
 
Posts: n/a

Default Re: xml date/time - 11-03-2009 , 09:10 AM



Travis Newbury <travisnewbury (AT) gmail (DOT) com> writes:

Quote:
On Nov 2, 9:21*am, Sherm Pendley <spamt... (AT) shermpendley (DOT) com> wrote:
That doesn't make XML on-topic here.

But being a dick does?
If it did, XML would be on-topic in every group you post in.

Bye bye asshole. *plonk*

sherm--

Reply With Quote
  #9  
Old   
Travis Newbury
 
Posts: n/a

Default Re: xml date/time - 11-03-2009 , 10:25 AM



On Nov 3, 9:10*am, Sherm Pendley <spamt... (AT) shermpendley (DOT) com> wrote:
Quote:
That doesn't make XML on-topic here.
But being a dick does?
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.....

Reply With Quote
  #10  
Old   
dorayme
 
Posts: n/a

Default Re: xml date/time - 11-03-2009 , 04:33 PM



In article
<03c6fce1-ec41-4a01-91d0-8b61a53c8b69 (AT) n35g2000yqm (DOT) googlegroups.com>,
Travis Newbury <travisnewbury (AT) gmail (DOT) com> wrote:

Quote:
On Nov 3, 9:10*am, Sherm Pendley <spamt... (AT) shermpendley (DOT) com> wrote:
That doesn't make XML on-topic here.
But being a dick does?
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.....
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!

--
dorayme

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.