Skip to content

Commit

Permalink
Merge pull request #185 from colinrgodsey/master
Browse files Browse the repository at this point in the history
Trimming of URI tag contents.
  • Loading branch information
eed3si9n committed Jan 13, 2013
2 parents bbb8f12 + 136a191 commit fb06cf2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli/src/main/resources/scalaxb.scala.template
Expand Up @@ -805,7 +805,7 @@ object Helper {
}

def toURI(value: String) =
java.net.URI.create(value)
java.net.URI.create(value.trim)

def isNil(node: scala.xml.Node) =
(node \ ("@{" + XSI_URL + "}nil")).headOption map { _.text == "true" } getOrElse {
Expand Down
4 changes: 2 additions & 2 deletions cli/src_managed/scalaxb/scalaxb.scala
Expand Up @@ -405,7 +405,7 @@ object DataRecord extends XMLStandardTypes {
case _ => DataRecord(value)
}

def apply[A:CanWriteXML](node: Node, parent: Node, value: A): DataRecord[A] = node match {
def apply[A:CanWriteXML](node: Node, parent: Node, value: A): DataRecord[A] = (node: Any) match {
case elem: Elem => DataRecord(node, value)
case attr: UnprefixedAttribute =>
val key = Some(attr.key)
Expand Down Expand Up @@ -805,7 +805,7 @@ object Helper {
}

def toURI(value: String) =
java.net.URI.create(value)
java.net.URI.create(value.trim)

def isNil(node: scala.xml.Node) =
(node \ ("@{" + XSI_URL + "}nil")).headOption map { _.text == "true" } getOrElse {
Expand Down

0 comments on commit fb06cf2

Please sign in to comment.