On 12.12.2008, at 15:49, J. McConnell wrote:

>
> On Fri, Dec 12, 2008 at 9:39 AM, Chouser <chou...@gmail.com> wrote:
>>
>> On Fri, Dec 12, 2008 at 9:15 AM, J. McConnell <jdo...@gmail.com>  
>> wrote:
>>>
>>> {:tag :root, :attrs nil, :content [
>>> {:tag :fragment, :attrs nil, :content [
>>>   {:tag :<http://purl.org/dc/elements/1.1/>:title, :attrs nil,
>>> :content ["A HEAD Title"]}
>>
>> As I mentioned in another thread, keywords can already handle urls as
>> namespaces:
>>
>> user=> (def tag :http://purl.org/dc/elements/1.1/title)
>> #'user/tag
>> user=> (namespace tag)
>> "http://purl.org/dc/elements/1.1";
>> user=> (name tag)
>> "title"
>
> Thanks, I saw that thread after posting.
>
>> It's a matter of extending clojure.xml to take advantage of this.
>
> This is what I was asking, should clojure.xml be extended in this way.
>
>> 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?

I agree that the NS-prefixes should be metadata. IMHO this is closer  
to the "spirit" of XML, in that value equality between the two  
snippets above would be established.

   --Chris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to