OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xri message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [xri] Removing priority attribute from XRD altogether


Thanks, Joesph. Will guessed correctly that was what you meant. And yes, I
follow the XPath stuff because we did that analysis of the XML serialization
of XDI - it too is completely searchable using regular XPath expressions the
way you point out.

Sounds like dropping priority has plenty to speak for it ;-)

=Drummond 

> -----Original Message-----
> From: Joseph Anthony Pasquale Holsten [mailto:joseph.holsten@cordance.net]
> Sent: Monday, August 31, 2009 9:03 AM
> To: Drummond Reed
> Cc: 'XRI TC'
> Subject: Re: [xri] Removing priority attribute from XRD altogether
> 
> It's an XPath that matches every Link element which contains at least
> one Rel element with the contents "stylesheet". So a good XPath
> implementation should be able to do XRD related resource processing
> with something like:
> 
>    def xrdRelProcess(doc, rel)
>      rel = escapeXML(rel)
>      xpath = sprintf('/xrd:XRD/xrd:Link[Rel="%s"]', rel)
>      namespaces = {'xrd' => "http://docs.oasis-open.org/ns/xri/xrd-1.0"}
>      links = doc.xpath(xpath, namespaces)
>      return links
>    end
> 
> Getting all the URIs and URITemplates from Links with a matching Rel
> is a bit more awkward, but still a one liner:
>    /xrd:XRD/xrd:Link[xrd:Rel="stylesheet"]/child::*[self::xrd:URI |
> self::xrd:URITemplate]
> Again, that's just matching for stylesheet links. You get the idea.
> 
> If we don't use document ordering, not only can I not handle this in a
> 1-liner, I can't seem to do it in just XPath alone. So you'd need to
> pull out XQuery:
> 
>    for $uri in /xrd:XRD/xrd:Link[xrd:Rel="stylesheet"]/
> child::*[self::xrd:URI | self::xrd:URITemplate]
>    order by $uri/../@Priority $uri/@Priority
>    return $uri
> 
> I think. I don't have an XQuery implementation lying around, so that's
> mostly a guess.
> 
> But in investigating implementations, I've found a little more trouble
> than I'd hoped for. The main problem with this is that libxml2 doesn't
> properly handle XPath expressions which include XML entities. That
> means it can't handle the right XPath for something like
> <Rel>foo'bar"baz&quux>zip<zap</Rel>, which should be /xrd:XRD/
> xrd:Link[Rel="foo&apos;bar&quot;baz&amp;quux&gt;zip&lt;zap"] or at
> least /xrd:XRD/xrd:Link[Rel="oo'bar&quot;baz&quux>zip<zap"]. Since
> libxml2 is behind a ton of implementations, I'm really trying to fix
> this bug this week.
> 
> Of course, if you grok all this in one read I envy your XPath-fu.
> 
> 
> 
> On Aug 31, 2009, at 12:08 AM, Drummond Reed wrote:
> 
> > Joesph, maybe I've just spent too much time remodelling this
> > weekend, but
> > can you unpack for me why /xrd:XRD/xrd:Link[xrd:Rel="stylesheet"] is
> > pretty
> > spiffy?
> >
> > Thanks,
> >
> > =Drummond
> >
> >> -----Original Message-----
> >> From: Joseph Anthony Pasquale Holsten
> [mailto:joseph.holsten@cordance.net
> >> ]
> >> Sent: Saturday, August 29, 2009 8:17 PM
> >> To: XRI TC
> >> Subject: Re: [xri] Removing priority attribute from XRD altogether
> >>
> >> +1 because /xrd:XRD/xrd:Link[xrd:Rel="stylesheet"] is pretty spiffy.
> >>
> >> On Aug 29, 2009, at 8:24 PM, John Bradley wrote:
> >>
> >>> We lose a round robin load balancing that no one ever used.
> >>>
> >>> Some things that don't preserve order may break.
> >>>
> >>> The addition of dsig requires order to be preserved anyway.
> >>>
> >>> I vote for dropping the priority attribute to simplify things.
> >>>
> >>> John B.
> >>> On 29-Aug-09, at 9:15 PM, Gabe Wachob wrote:
> >>>
> >>>> Wow.
> >>>>
> >>>> This feels like deja vu, only the consensus on this list is 180
> >>>> degrees different.
> >>>>
> >>>> I'm all for relying on ordering, always have been. Any There was
> >>>> significant opposition
> >>>>
> >>>> +1e6 to dropping the priority attribute.
> >>>>
> >>>> -Gabe (yes, I'm still a TC member for the time being)
> >>>>
> >>>> On Fri, Aug 28, 2009 at 10:25 AM, <njones@ouno.com> wrote:
> >>>>> +1 On dropping the priority attribute.
> >>>>>
> >>>>> On Thu, 27 Aug 2009 22:07:26 -0700, Eran Hammer-Lahav
> >> <eran@hueniverse.com
> >>>>>>
> >>>>> wrote:
> >>>>>> If the XML experts on the list feel comfortable with the
> >>>>>> ability to
> >>>>>> preserve document ordering, I am very much in favor of dropping
> >>>>>> the
> >>>>>> priority attribute.
> >>>>>>
> >>>>>> EHL
> >>>>>>
> >>>>>>> -----Original Message-----
> >>>>>>> From: Scott Cantor [mailto:cantor.2@osu.edu]
> >>>>>>> Sent: Thursday, August 27, 2009 6:30 PM
> >>>>>>> To: 'Peter Davis'
> >>>>>>> Cc: 'XRI TC'; 'DeWitt Clinton'
> >>>>>>> Subject: RE: [xri] Removing priority attribute from XRD
> >>>>>>> altogether
> >>>>>>>
> >>>>>>> Peter Davis wrote on 2009-08-27:
> >>>>>>>> My concern with this is that i fear that XRD instances which
> >>>>>>>> are
> >>>>>>>> dynamically generated within an application are able to produce
> >>>>>>>> service elements in the order they intend when serializing
> >>>>>>>> their
> >>>>>>>> object into XML.  I do not have sufficient exposure to enough
> >>>>>>>> XML
> >>>>>>>> libraries to know if this is truly an issue, however.
> >>>>>>>
> >>>>>>> I mentioned on the call that the people who would have problems
> >>>>>>> with
> >>>>>>> order
> >>>>>>> are those using dumb or broken data binding tools. There are
> >>>>>>> specs that
> >>>>>>> have
> >>>>>>> made and continue to make such allowances, but I think this is a
> >>>>>>> lot of
> >>>>>>> effort for the rest of us to help people using broken tools.
> >>>>>>>
> >>>>>>> (A similar argument exists regarding making allowances for
> >>>>>>> people that
> >>>>>>> insist on using non-XML tools to process XML.)
> >>>>>>>
> >>>>>>> -- Scott
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> ------------------------------------------------------------------
> --
> >> -
> >>>>>>> To unsubscribe from this mail list, you must leave the OASIS TC
> >>>>>>> that
> >>>>>>> generates this mail.  Follow this link to all your TCs in OASIS
> >>>>>>> at:
> >>>>>>> https://www.oasis-
> >> open.org/apps/org/workgroup/portal/my_workgroups.php
> >>>>>>
> >>>>>>
> >>>>>> -------------------------------------------------------------------
> --
> >>>>>> To unsubscribe from this mail list, you must leave the OASIS TC
> >>>>>> that
> >>>>>> generates this mail.  Follow this link to all your TCs in OASIS
> >>>>>> at:
> >>>>>> https://www.oasis-
> >> open.org/apps/org/workgroup/portal/my_workgroups.php
> >>>>>
> >>>>> --------------------------------------------------------------------
> -
> >>>>> To unsubscribe from this mail list, you must leave the OASIS TC
> >>>>> that
> >>>>> generates this mail.  Follow this link to all your TCs in OASIS
> >>>>> at:
> >>>>> https://www.oasis-
> open.org/apps/org/workgroup/portal/my_workgroups.php
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Gabe Wachob / gwachob@wachob.com \ http://beatslacker.com
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe from this mail list, you must leave the OASIS TC
> >>>> that
> >>>> generates this mail.  Follow this link to all your TCs in OASIS at:
> >>>> https://www.oasis-open.org/apps/org/workgroup/portal/
> >>>> my_workgroups.php
> >>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe from this mail list, you must leave the OASIS TC that
> >>> generates this mail.  Follow this link to all your TCs in OASIS at:
> >>> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this mail list, you must leave the OASIS TC that
> >> generates this mail.  Follow this link to all your TCs in OASIS at:
> >> https://www.oasis-open.org/apps/org/workgroup/portal/
> >> my_workgroups.php
> >
> >




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]