- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
i can haz scala xml???
Wed, 2009-03-04, 22:11
Sir and Dame Scalahads,
i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated.
res9: scala.xml.Elem = <fu><bar>5</bar></fu>
scala>
[WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope)
[WARNING] required: scala.xml.MetaData
[WARNING] TopScope,
[WARNING] ^
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}>
but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated.
- When i type the following into Scala version 2.7.2.final repl, it all works
res9: scala.xml.Elem = <fu><bar>5</bar></fu>
scala>
- But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't.
[WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope)
[WARNING] required: scala.xml.MetaData
[WARNING] TopScope,
[WARNING] ^
- Where do i go to see the new api?
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}>
but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Wed, 2009-03-04, 22:37
#2
Re: i can haz scala xml???
David,
Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}> is a scheme for what i'd like to do, but it's probably too hard to make work.
Best wishes,
--greg
On Wed, Mar 4, 2009 at 1:13 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}> is a scheme for what i'd like to do, but it's probably too hard to make work.
Best wishes,
--greg
On Wed, Mar 4, 2009 at 1:13 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
scala> <fu><bar>5</bar></fu>res0: scala.xml.Elem = <fu><bar>5</bar></fu>
scala> <fu>{(1 to 3).map(i => <item>{i}</item>)}</fu> res1: scala.xml.Elem = <fu><item>1</item><item>2</item><item>3</item></fu>
Does that give you what you want (XML literals are part of the language)
On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Sir and Dame Scalahads,
i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated.
scala> scala.xml.Elem(null,"fu",null,scala.xml.TopScope,scala.xml.Elem(null,"bar",null,scala.xml.TopScope,scala.xml.Text("5")))
- When i type the following into Scala version 2.7.2.final repl, it all works
res9: scala.xml.Elem = <fu><bar>5</bar></fu>
scala>[WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch;
- But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't.
[WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope)
[WARNING] required: scala.xml.MetaData
[WARNING] TopScope,
[WARNING] ^It would be cooler if i could do something like
- Where do i go to see the new api?
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}>
but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Wed, 2009-03-04, 23:17
#3
Re: i can haz scala xml???
On Wed, Mar 4, 2009 at 1:16 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
David,
Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}> is a scheme for what i'd like to do, but it's probably too hard to make work.
Sorry for being dense about your question.
If you want to send me your file directly, I think I know what's going on (I think it's an import related issue...)
Best wishes,
--greg- Show quoted text -
On Wed, Mar 4, 2009 at 1:13 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
scala> <fu><bar>5</bar></fu>res0: scala.xml.Elem = <fu><bar>5</bar></fu>
scala> <fu>{(1 to 3).map(i => <item>{i}</item>)}</fu> res1: scala.xml.Elem = <fu><item>1</item><item>2</item><item>3</item></fu>
Does that give you what you want (XML literals are part of the language)
On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Sir and Dame Scalahads,
i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated.
scala> scala.xml.Elem(null,"fu",null,scala.xml.TopScope,scala.xml.Elem(null,"bar",null,scala.xml.TopScope,scala.xml.Text("5")))
- When i type the following into Scala version 2.7.2.final repl, it all works
res9: scala.xml.Elem = <fu><bar>5</bar></fu>
scala>[WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch;
- But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't.
[WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope)
[WARNING] required: scala.xml.MetaData
[WARNING] TopScope,
[WARNING] ^It would be cooler if i could do something like
- Where do i go to see the new api?
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}>
but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Wed, 2009-03-04, 23:27
#4
Re: i can haz scala xml???
David,
Thanks for the attention to the problem. i resolved the issue. There was a missing param in my programmatic call: cut-n-pasto.
Best wishes,
--greg
On Wed, Mar 4, 2009 at 2:03 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
Thanks for the attention to the problem. i resolved the issue. There was a missing param in my programmatic call: cut-n-pasto.
Best wishes,
--greg
On Wed, Mar 4, 2009 at 2:03 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
On Wed, Mar 4, 2009 at 1:16 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
David,
Thanks, but not quite. Unfortunately, i do not know the name of the tag. i have to compute it. So, your soln won't work. As i mentioned in my email, the following
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}> is a scheme for what i'd like to do, but it's probably too hard to make work.
Sorry for being dense about your question.
If you want to send me your file directly, I think I know what's going on (I think it's an import related issue...)
Best wishes,
--greg- Show quoted text -
On Wed, Mar 4, 2009 at 1:13 PM, David Pollak <feeder.of.the.bears@gmail.com> wrote:
scala> <fu><bar>5</bar></fu>res0: scala.xml.Elem = <fu><bar>5</bar></fu>
scala> <fu>{(1 to 3).map(i => <item>{i}</item>)}</fu> res1: scala.xml.Elem = <fu><item>1</item><item>2</item><item>3</item></fu>
Does that give you what you want (XML literals are part of the language)
On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
Sir and Dame Scalahads,
i was attempting to do something really simple-minded with scala.xml._ and it didn't perform according to Burak's tutorial. So, any clues about the following would be greatly appreciated.
scala> scala.xml.Elem(null,"fu",null,scala.xml.TopScope,scala.xml.Elem(null,"bar",null,scala.xml.TopScope,scala.xml.Text("5")))
- When i type the following into Scala version 2.7.2.final repl, it all works
res9: scala.xml.Elem = <fu><bar>5</bar></fu>
scala>[WARNING] /Users/lgm/work/src/projex/bobj/dspace/src/main/scala/com/sap/dspace/model/othello/render.scala:26: error: type mismatch;
- But when i attempt to compile a similar expression in Scala version 2.7.3, it doesn't.
[WARNING] found : scala.xml.TopScope.type (with underlying type object scala.xml.TopScope)
[WARNING] required: scala.xml.MetaData
[WARNING] TopScope,
[WARNING] ^It would be cooler if i could do something like
- Where do i go to see the new api?
<{computeTag(context)}>{computeTagContents(context)}</{computeTag(context}>
but i think that might be a parsing nightmare and so i'm guessing this isn't supported. i'd love to know if i'm wrong.
Best wishes,
--greg
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105
+1 206.650.3740
http://biosimilarity.blogspot.com
scala> <fu>{(1 to 3).map(i => <item>{i}</item>)}</fu> res1: scala.xml.Elem = <fu><item>1</item><item>2</item><item>3</item></fu>
Does that give you what you want (XML literals are part of the language)
On Wed, Mar 4, 2009 at 1:10 PM, Meredith Gregory <lgreg.meredith@gmail.com> wrote:
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp