?

Log in

No account? Create an account
A while ago, I posted asking about an XML DTD for saving LiveJournal… - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Apr. 9th, 2004|02:55 am]
LiveJournal Client Discussions

lj_clients

[int]
[mood |hyperhyper]
[music |Dance Hall Crashers - Sticky]

A while ago, I posted asking about an XML DTD for saving LiveJournal drafts and entries. evan said he had one for LogJam, but lost it. So I played around with LogJam for a bit and tried to draw one up from the output. Here's what I ended up with.

<!ELEMENT entry (subject?,event,mood?,music?,pickeyword?,preformatted?,backdated?,comments?,time?,security?)>
<!ELEMENT subject (#PCDATA)>
<!ELEMENT event (#PCDATA)>
<!ELEMENT mood (#PCDATA)>
<!ELEMENT music (#PCDATA)>
<!ELEMENT pickeyword (#PCDATA)>
<!ELEMENT preformatted EMPTY>
<!ELEMENT backdated EMPTY>
<!ELEMENT comments EMPTY>
<!ELEMENT time (#PCDATA)>
<!ELEMENT security EMPTY>

<!ATTLIST entry itemid ID>
<!ATTLIST comments type (noemail|disable) #REQUIRED>
<!ATTLIST security type (friends|custom) #REQUIRED>
<!ATTLIST security allowmask CDATA>


I'm not really sure if that's completely right or not, as this is the first XML DTD I've ever written and it's been done from a tutorial on w3schools (which I think only shows Microsoft's implementations of everything). If anyone could help out to perfect this, it'd be great. It's just so people could load drafts from different clients if they felt like doing that for whatever reason (and the client used this format).
linkReply

Comments:
[User Picture]From: leprosy
2004-04-08 11:56 am (UTC)
I looked over your DTD vs. the documentation for posting an event using the XML interface.

You'd probably want to alter the date to match that format to make your life easier especially with regards to internationalization.

There's also shared journal info which I didn't use, but you might want to stash away.

Security is actually public|private|custom since friends-only is actually just custom with a mask of 1.

This is where you can see all the entry properties LJ exposes. You might want to store the mood as both a string and a mood ID.

There's more up to date documentation elsewhere, but I used the two pages above.
(Reply) (Thread)
From: evan
2004-04-08 12:15 pm (UTC)
i tried to match the export to the semantics and not the precise output from the protocol.

for example, there are two booleans related to comments: disabled and noemail, but setting both to true makes no sense. so we make it a three-way option: default, disabled, noemail.

(speaking of which: the comments needs to either be optional or to have a "default" option.)
(Reply) (Parent) (Thread)
[User Picture]From: leprosy
2004-04-08 07:52 pm (UTC)
Yeah, it makes more sense as a three way option.
(Reply) (Parent) (Thread)
[User Picture]From: benzado
2004-04-08 12:18 pm (UTC)

Thanks!

Thanks for doing this. I've been wanting to add XML support to LJKit.
(Reply) (Thread)
[User Picture]From: mooingtricycle
2004-04-10 03:42 pm (UTC)
is that..... Booga!!!????????? ^___________^ TANK GIRL ALL THE WAY! Did you know, that the creator of Tank girl designed the Gorillaz Animation designs too?! - Alicia
(Reply) (Thread)
[User Picture]From: int
2004-04-12 09:28 pm (UTC)
Yep. :D
(Reply) (Parent) (Thread)