On Fri, Dec 12, 2008 at 9:49 AM, J. McConnell <[email protected]> wrote:
> On Fri, Dec 12, 2008 at 9:39 AM, Chouser <[email protected]> wrote:
>>
>> I think it's often desirable to also maintain (somewhere) the original
>> document's shortcut names, and use those where applicable when
>> emitting XML text again.
>
> I agree. Unfortunately, that breaks the equality semantics that some
> would expect. Perhaps we could come up with a way to store the
> original aliases in metadata, since that's really what they are?
Something like:
#^{:xmlns-aliases {:http://purl.org/dc/elements/1.1 :dc}}
{:tag :root, :attrs nil, :content [
#^{:xmlns-aliases {:http://www.w3.org/1999/xhtml xyz}}
{:tag :fragment, :attrs nil, :content [
{:tag :http://purl.org/dc/elements/1.1/title, :attrs nil,
:content ["A HEAD Title"]}
{:tag :http://www.w3.org/1999/xhtml/:title, :attrs nil, :content
["A BODY Title"]}
]}
#^{:xmlns-aliases {:http://www.w3.org/1999/xhtml zyx}}
{:tag :fragment, :attrs nil, :content [
{:tag :http://purl.org/dc/elements/1.1/:title, :attrs nil,
:content ["A HEAD Title"]}
{:tag :http://www.w3.org/1999/xhtml/:title, :attrs nil,
:content ["A BODY Title"]}
]}
]}
- J.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---