problem on crossref xsd using scalaxb 1.0.1

78 views
Skip to first unread message

Marcos Iriarte

unread,
Mar 12, 2013, 9:49:34 PM3/12/13
to sca...@googlegroups.com
Hi,

I'm trying to use scalaxb on my project and I'm getting this error on eclipse:
not found: value p1 xmlprotocol.scala

the code around this error:
  trait DefaultCrossrefUpdateFormat extends scalaxb.XMLFormat[org.crossref.Update] with scalaxb.CanWriteChildNodes[org.crossref.Update] {
    val targetNamespace: Option[String] = Some("http://www.crossref.org/schema/4.3.1")
    
    def reads(seq: scala.xml.NodeSeq, stack: List[scalaxb.ElemName]): Either[String, org.crossref.Update] = seq match {
      case node: scala.xml.Node => Right(org.crossref.Update(Seq.concat(p1.toList,     // Stops compiling here
        Seq(p2),
        p3.toList),
        scalaxb.fromXML[String]((node \ "@label"), scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[String]((node \ "@type"), scalaxb.ElemName(node) :: stack),
        scalaxb.fromXML[javax.xml.datatype.XMLGregorianCalendar]((node \ "@date"), scalaxb.ElemName(node) :: stack)))
      case _ => Left("reads failed: seq must be scala.xml.Node")
    }
    
    override def writesAttribute(__obj: org.crossref.Update, __scope: scala.xml.NamespaceBinding): scala.xml.MetaData = {
      var attr: scala.xml.MetaData  = scala.xml.Null
      attr = scala.xml.Attribute(null, "label", __obj.label.toString, attr)
      attr = scala.xml.Attribute(null, "type", __obj.typeValue.toString, attr)
      attr = scala.xml.Attribute(null, "date", __obj.date.toString, attr)
      attr
    }

    def writesChildNodes(__obj: org.crossref.Update, __scope: scala.xml.NamespaceBinding): Seq[scala.xml.Node] =
      __obj.mixed.toSeq flatMap { x => scalaxb.toXML[scalaxb.DataRecord[Any]](x, x.namespace, x.key, __scope, false) }

  }

What could I do? My environment is:
scalaxb 1.0.1
scala 2.9.2

Thanks,
Marcos Iriarte

eugene yokota

unread,
Mar 13, 2013, 1:17:44 AM3/13/13
to sca...@googlegroups.com
I think this is a scalaxb bug.
Could you open a github issue?

-eugene
Reply all
Reply to author
Forward
0 new messages