This page is no longer maintained — Please continue to the home page at www.scala-lang.org

[scala-bts] #2125: Xml RuleTransformer blows up on <xml:group>

1 reply
Scala 2
Joined: 2009-03-05,
User offline. Last seen 42 years 45 weeks ago.

-------------------------+--------------------------------------------------
Reporter: BenHutchison | Owner: scala-xml_team
Type: defect | Status: new
Priority: normal | Component: XML support
Keywords: |
-------------------------+--------------------------------------------------
Running the code below results in:
java.lang.UnsupportedOperationException: class Group does not support
method 'child'

object TransformBug2 {

val sampleXml =

def main(args: scala.Array[String]) {
println(new RuleTransformer(new RewriteRule {

override def transform(n: Node): NodeSeq = {

val result = n match {

case {_*} =>

case n => n
}
// println ("Rewriting '" +n+ "' to: '" + result+ "'")
result
}
}).transform(sampleXml))
}
}

Scala 2
Joined: 2009-03-05,
User offline. Last seen 42 years 45 weeks ago.
Re: [scala-bts] #2125: Xml RuleTransformer blows up on <xml:grou

-----------------------------+----------------------------------------------
Reporter: BenHutchison | Owner: scala-xml_team
Type: defect | Status: closed
Priority: normal | Component: XML support
Version: Unreleased-2.8.x | Resolution: fixed
Keywords: |
-----------------------------+----------------------------------------------
Changes (by extempore):

* cc: paulp@… (added)
* status: new => closed
* version: => Unreleased-2.8.x
* resolution: => fixed

Comment:

Fixed in r18210.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland