/[alph]/alph/org/nongnu/alph/xml/SpanSerializer.java
ViewVC logotype

Diff of /alph/org/nongnu/alph/xml/SpanSerializer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by tjl, Wed Mar 26 09:39:48 2003 UTC revision 1.2 by tjl, Wed Mar 26 10:17:54 2003 UTC
# Line 13  public class SpanSerializer { Line 13  public class SpanSerializer {
13      public String span2xml(Span s0) {      public String span2xml(Span s0) {
14          if(s0 instanceof TextSpan) {          if(s0 instanceof TextSpan) {
15              TextSpan s = (TextSpan)s0;              TextSpan s = (TextSpan)s0;
16              return "<" + (namespace == null ? "" : ns+":") +              return "<" + (namespace == null ? "" :
17                                                  namespace+":") +
18                          "ts b=\""+s.getScrollBlock().getID()+                          "ts b=\""+s.getScrollBlock().getID()+
19                          "\" s=\""+s.offset()+                          "\" s=\""+s.offset()+
20                          "\" e=\""+(s.offset()+s.length())+"\"/>";                          "\" e=\""+(s.offset()+s.length())+"\"/>";
21          } else {          } else {
22              throw new Error("Don't know how to serialize "+s+" yet");              throw new Error("Don't know how to serialize "+s0+" yet");
23          }          }
24      }      }
25    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26