From dimitri.glazkov at gmail.com Wed Aug 8 12:03:09 2007 From: dimitri.glazkov at gmail.com (Dimitri Glazkov) Date: Wed Aug 8 12:03:11 2007 Subject: [uf-dev] XOXO -> JSON In-Reply-To: References: Message-ID: Following up on an earlier discussion: http://tinyurl.com/34de9r ... Suppose, I have this bit of XOXO: http://tinyurl.com/2rygz6 Running this through Kevin's parser produces this: http://tinyurl.com/39h3v7, which doesn't seem right. One obvious thing is that the parser does not account for first text node as the "text" property value, and then the property bag of the second item is presented as an object, separate from its children. One possibility is to treat the property bag and the list of children of a XOXO node as two items of an array: [ [ { p1: "v1", p2: "v2" }, [ [ /* nested item */ { url: "http://tinyurl.com/39h3v7" } ] ] This approach would result in conversion of XOXO mentioned earler to: http://tinyurl.com/37umpf Still, the ordered/unordered information is lost. Should it be a dictionary, instead?: { data: { p1: "v1", p2: "v2" }, ol: [ { url: "http://tinyurl.com/39h3v7" } ] } Any feedback, ideas, alternatives are appreciated. :DG< From dimitri.glazkov at gmail.com Wed Aug 8 12:03:43 2007 From: dimitri.glazkov at gmail.com (Dimitri Glazkov) Date: Wed Aug 8 12:03:45 2007 Subject: [uf-dev] Parsing XOXO "text" Property Value In-Reply-To: References: Message-ID: Inferring from the spec, the parsing of the "text" property value occurs following these rules: * If the first child of LI is a text node, it is the "text" value * Otherwise, if there is a child A element, the sub-tree of the first (or last?) A element is the "text" value * Otherwise, if there is a child DL element and the DT element with one child text node with the value of "text", and the following DD element, the sub-tree of the first (or last?) element matching this rule is the "text" value * Otherwise, the "text" value is empty Last/first rule is impossible to infer from provided examples in the spec, but it appears that all parsers use bag/dictionary to keep track of the properties, and all of them re-assign value when encountered, which leads me to believe that _last_ is the status quo in the implemented parsers. I attempted to read the code of xoxo.py to study how it implements it, but I am a newbie to Python, so it's taking a bit of time. I was wondering if I could get some remedial help from a more seasoned Python developer to reconstruct its parsing algorithm. Obviously, the feedback on the parsing algorithm is much appreciated. :DG< From dimitri.glazkov at gmail.com Wed Aug 8 13:33:33 2007 From: dimitri.glazkov at gmail.com (Dimitri Glazkov) Date: Wed Aug 8 13:33:37 2007 Subject: [uf-dev] XOXO Test Cases Message-ID: Hi all, I put together a quick first-stab set of XOXO test cases here: http://garage.estradacms.com/play/xoxo/ Please review and let me know if I am heading in the right direction. :DG< From Corey.Lucier at corp.aol.com Thu Aug 16 11:15:43 2007 From: Corey.Lucier at corp.aol.com (Corey Lucier) Date: Thu Aug 16 11:16:05 2007 Subject: [uf-dev] Actionscript 3 Microformat Consumption Message-ID: <46C4944F.1010709@corp.aol.com> Hi, Has anyone successfully consumed one or more microformats from within Flash (without the aid of the browser). Specifically with Actionscript 3. Could it be as simple as leveraging the XML class and grubbing through the XML dom? Thoughts? Regards, Corey Lucier