You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Output:
Element in:
Is element: true
Is attr: false
Is text: false
type: xs:untyped
Expected:
type: xs:element
Attribute in:
Is element: false
Is attr: true
Is text: false
type: xs:untyped
type: xs:attribute
Text in:
Is element: false
Is attr: false
Is text: true
[error] play - Cannot invoke the action, eventually got an error: java.lang.IllegalStateException: No other node types supported!
at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10.jar:2.2.2]
at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10.jar:2.2.2]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
at scala.Option.map(Option.scala:145) [scala-library.jar:na]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2.applyOrElse(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
Caused by: java.lang.IllegalStateException: No other node types supported!
at org.sirix.page.NamePage.getName(NamePage.java:159) ~[sirix-core-0.1.2-SNAPSHOT.jar:na]
at org.sirix.access.PageReadTrxImpl.getName(PageReadTrxImpl.java:484) ~[sirix-core-0.1.2-SNAPSHOT.jar:na]
at org.sirix.access.NodeReadTrxImpl.getType(NodeReadTrxImpl.java:375) ~[sirix-core-0.1.2-SNAPSHOT.jar:na]
at models.SirixHandler.getDiffs(SirixHandler.java:613) ~[na:na]
at models.SirixHandler.generateDiffs(SirixHandler.java:572) ~[na:na]
at models.SirixHandler.getDiff(SirixHandler.java:751) ~[na:na]
Expekted xs:text or xs:string
The text was updated successfully, but these errors were encountered:
Yeah, currently everything should be xs:untyped as currently the type is not stored. For nodes despite characters / text it's very simple and for text it might or might not be xs:string. This could be statically returned but I'm not sure if it helps. For instance simply always return xs:string for text nodes and xs:element for element nodes. However, you might want the characters as xs:integer if only numbers are represented in the specific node.
Probably getKind() helps as it returns an enum type. And probably getType() should throw an UnsupportedOperationException until the type is really stored.
Code:
rtx.moveTo(diffTuple.getNewNodeKey());
System.out.println("Is element: " +rtx.isElement());
System.out.println("Is attr: " +rtx.isAttribute());
System.out.println("Is text: " +rtx.isText());
System.out.println("type: "+rtx.getType());
Output:
Element in:
Is element: true
Is attr: false
Is text: false
type: xs:untyped
Expected:
type: xs:element
Attribute in:
Is element: false
Is attr: true
Is text: false
type: xs:untyped
type: xs:attribute
Text in:
Is element: false
Is attr: false
Is text: true
[error] play - Cannot invoke the action, eventually got an error: java.lang.IllegalStateException: No other node types supported!
at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10.jar:2.2.2]
at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10.jar:2.2.2]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2$$anonfun$applyOrElse$3.apply(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
at scala.Option.map(Option.scala:145) [scala-library.jar:na]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$2.applyOrElse(PlayDefaultUpstreamHandler.scala:261) [play_2.10.jar:2.2.2]
Caused by: java.lang.IllegalStateException: No other node types supported!
at org.sirix.page.NamePage.getName(NamePage.java:159) ~[sirix-core-0.1.2-SNAPSHOT.jar:na]
at org.sirix.access.PageReadTrxImpl.getName(PageReadTrxImpl.java:484) ~[sirix-core-0.1.2-SNAPSHOT.jar:na]
at org.sirix.access.NodeReadTrxImpl.getType(NodeReadTrxImpl.java:375) ~[sirix-core-0.1.2-SNAPSHOT.jar:na]
at models.SirixHandler.getDiffs(SirixHandler.java:613) ~[na:na]
at models.SirixHandler.generateDiffs(SirixHandler.java:572) ~[na:na]
at models.SirixHandler.getDiff(SirixHandler.java:751) ~[na:na]
Expekted xs:text or xs:string
The text was updated successfully, but these errors were encountered: