Ricky,

That works for me. Is there a corresponding relational binding?

Best wishes,

--greg

On Fri, Jan 30, 2009 at 11:55 PM, Ricky Clarkson
<[email protected]>wrote:

> Isn't Scala's XML already linq-like support for XQuery?
>
> An XQuery example from wikipedia:
>
> <html><head/><body>
> {
>   for $act in doc("hamlet.xml")//ACT
>   let $speakers := distinct-values($act//SPEAKER)
>
>   return
>     <div>
>       <h1>{ string($act/TITLE) }</h1>
>       <ul>
>       {
>         for $speaker in $speakers
>         return <li>{ $speaker }</li>
>       }
>       </ul>
>
>     </div>
> }
> </body></html>
>
>
> A port to Scala:
>
> <html><head/><body>
> {
>   for { act <- doc("hamlet.xml") \\ "ACT"
>         speakers = distinctValues(act \\ "SPEAKER") }
>
>       yield
>         <div>
>           <h1>{ act \ "TITLE" }</h1>
>           <ul>
>           {
>             for (speaker <- speakers)
>               yield <li>{ speaker }</li>
>
>           }
>           </ul>
>         </div>
> }
> </body></html>
>
> 2009/1/31 Meredith Gregory <[email protected]>
>
> Alex,
>>
>> This is probably way out of scope, but since someone brought up XPath, i
>> couldn't resist... LINQ-like support for XQuery?
>>
>> Best wishes,
>>
>> --greg
>>
>> On Fri, Jan 30, 2009 at 3:34 PM, Alex Cruise <[email protected]> wrote:
>>
>>> Hi folks!
>>>
>>> I'm Alex Cruise (obviously!) I'm a software architect at
>>> http://www.layer7tech.com/ (located in Vancouver, Canada) and have been
>>> hanging around the Scala community for about a year and a half.  I have
>>> recently volunteered to serve as a coordinator for the Scala XML team.  At
>>> this time, the XML team (apart from EPFL people, of course) consists of
>>> myself, Michael Fogus, Normen Müller and (I think) David Pollak, but
>>> contributions--including bug reports, patches, complaints, feature requests
>>> and existential angst--are of course welcome from everyone.
>>>
>>> On behalf of said team, I would like to invite everyone who is interested
>>> in Scala's XML support to join the new scala-xml list!  (This post cc'd to
>>> scala and liftweb--the latter because the Lift project is easily one of the
>>> heaviest users of scala.xml, and I'm certain that members of that community
>>> will enthusiastically join in the discussion in short order. :)  If you'd
>>> like to watch the sausage being made, or even turn the crank a bit yourself,
>>> please subscribe to scala-xml by sending an empty email to
>>> [email protected] .
>>>
>>> Here's some background info for anyone who is unfamiliar with Scala's XML
>>> support:  The Scala compiler supports XML literals in Scala source files,
>>> with very few additional restrictions on their syntax.  XML literals are
>>> translated into a tree built from instances of several classes in the
>>> scala.xml package (
>>> http://www.scala-lang.org/docu/files/api/scala/xml$package.html), and
>>> may contain nested Scala expressions (each of which can also incorporate
>>> sub-nested XML literals, etc...) whose results are interpolated into the
>>> XML.
>>>
>>> The scala.xml.Node class and its descendants form a comparatively
>>> lightweight, immutable, DOM-like representation of XML that can be used in
>>> pattern matching and provide simple, XPath-like node selection queries. The
>>> package also contains a few parsers and other assorted tools.
>>>
>>> IMO we owe a debt of gratitude to Burak Emir, the primary developer of
>>> scala.xml.  I believe he has laid a solid foundation that will serve us
>>> well.  Burak also wrote
>>> http://burak.emir.googlepages.com/scalaxbook.docbk.html which gives
>>> insight into the rationale behind the design and implementation of the
>>> library.
>>>
>>> Now, let's kick off the list with a small agenda:
>>>
>>> 1) Bug triage
>>>
>>> Rather than list the (~18) known bugs here, I'll supply an URL (
>>> http://lampsvn.epfl.decenturl.com/scala-xml-bugs), and anyone who feels
>>> like their favourite bug merits further discussion should fire up a new
>>> topic on scala-xml and we'll start hashing it out.  If nobody pipes up I'll
>>> start posting individual emails regarding each bug with a few of my own
>>> comments in a few days.
>>>
>>> 2) Proposed enhancements
>>>
>>> I'm sure many of us have a wish list of things we would like to see
>>> changed in Scala's XML support--please feel free to join in and tell us all
>>> about them.
>>>
>>> Thanks for your time,
>>>
>>> -0xe1a
>>>
>>
>>
>>
>> --
>> L.G. Meredith
>> Managing Partner
>> Biosimilarity LLC
>> 806 55th St NE
>> Seattle, WA 98105
>>
>> +1 206.650.3740
>>
>> http://biosimilarity.blogspot.com
>>
>
>


-- 
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" 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/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to