Iam trying to create a server doc with the code below.
DocInitializationBuilder docBuild = new
DocInitializationBuilder();
docBuild.elementStart("P",Attributes.EMPTY_MAP);
docBuild.characters("ABCD");
docBuild.elementEnd();
AnnotationBoundaryMap o = new
AnnotationBoundaryMapImpl(new String[]
{"style"},new String[]{"style/fontStyle"},new String[]{null},new
String[]{"italics"});
docBuild.characters("google");
docBuild.annotationBoundary(o);
docBuild.characters("wave");
serverDoc=docBuild.build();
When I execute this I get the exception as shown.Without
docBuild.annotationBoundary(o); it works
Not sure how to resolve this problem.
java.lang.IllegalStateException: Attempt to build ill-formed operation
(ViolationCollector[1: ill-fo
rmed: annotation of key style ends without having started at original
document position 0 / resultin
g document position 12]): << P {}; ++"ABCD"; >>; ++"google"; ||
{ "style", "style/fontStyle": null -
> "italics" }; ++"wave";
at
org.waveprotocol.wave.model.util.Preconditions.illegalState(Preconditions.java:
143)
at
org.waveprotocol.wave.model.document.operation.impl.BufferedDocOpImpl.checkWellformedness
(BufferedDocOpImpl .java:84)
at
org.waveprotocol.wave.model.document.operation.impl.BufferedDocOpImpl.create(BufferedDocOpImpl
java:59)
at
org.waveprotocol.wave.model.document.operation.impl.DocInitializationBuilder.build(DocInitializationBuilder.java:
35)
at ZWCollab.<clinit>(ZWCollab.java:45)
Thanks,
Krithi
--
You received this message because you are subscribed to the Google Groups "Wave
Protocol" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/wave-protocol?hl=en.