From b92066039f5241127cf77b5b0a011267d7dfe3c5 Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Wed, 16 Jan 2008 11:01:38 +0000 Subject: [PATCH] The guillemot characters are now output with their Unicode HTML numeric escapes instead of their HTML symbolic values. This makes the output work correctly on Mac OS X, and also easier to validate with XML tools. (patch submitted by Joshua Lim). --- doc/ver.xml | 6 ++++++ src/org/umlgraph/doclet/Options.java | 9 +++++++-- testdata/dot-ref/.cvsignore | 1 + testdata/dot-ref/Inference.dot | 2 +- testdata/dot-ref/Irp.dot | 2 +- testdata/dot-ref/MyVector.dot | 6 +++--- testdata/dot-ref/RunnableRef.dot | 2 +- testdata/dot-ref/Style.dot | 2 +- testdata/dot-ref/ViewColors.dot | 2 +- testdata/dot-ref/ViewInterfaces.dot | 6 +++--- testdata/dot-ref/advrel.dot | 4 ++-- testdata/dot-ref/catalina.dot | 8 ++++---- testdata/dot-ref/classadd.dot | 2 +- testdata/dot-ref/java5.dot | 2 +- testdata/dot-ref/strip.dot | 2 +- 15 files changed, 34 insertions(+), 22 deletions(-) diff --git a/doc/ver.xml b/doc/ver.xml index 9c33b17..339d30e 100644 --- a/doc/ver.xml +++ b/doc/ver.xml @@ -10,6 +10,12 @@ Nested class hyperlinks to Javadoc documentation now work correctly (patch submitted by David P. Caldwell). +
  • +The guillemot characters are now output with their Unicode HTML numeric +escapes instead of their HTML symbolic values. +This makes the output work correctly on Mac OS X, and also easier +to validate with XML tools. +(patch submitted by Joshua Lim). diff --git a/src/org/umlgraph/doclet/Options.java b/src/org/umlgraph/doclet/Options.java index 8a6465b..7842c29 100644 --- a/src/org/umlgraph/doclet/Options.java +++ b/src/org/umlgraph/doclet/Options.java @@ -105,10 +105,15 @@ public class Options implements Cloneable, OptionProvider { boolean findViews; String viewName; public String outputDirectory; + /* + * Numeric values are preferable to symbolic here. + * Symbolic reportedly fail on MacOSX, and also are + * more difficult to verify with XML tools. + */ /** Guillemot left (open) */ - String guilOpen = "«"; // "\u00ab"; + String guilOpen = "«"; // « \u00ab /** Guillemot right (close) */ - String guilClose = "»"; // "\u00bb"; + String guilClose = "»"; // » \u00bb boolean inferRelationships; boolean inferDependencies; RelationPattern contextRelationPattern; diff --git a/testdata/dot-ref/.cvsignore b/testdata/dot-ref/.cvsignore index e33609d..b38f805 100644 --- a/testdata/dot-ref/.cvsignore +++ b/testdata/dot-ref/.cvsignore @@ -1 +1,2 @@ +*.dot *.png diff --git a/testdata/dot-ref/Inference.dot b/testdata/dot-ref/Inference.dot index d033bcd..309036f 100644 --- a/testdata/dot-ref/Inference.dot +++ b/testdata/dot-ref/Inference.dot @@ -46,6 +46,6 @@ digraph G { // java.util.ArrayList c119 [label=<
    ArrayList<E>
    serialVersionUID : long
    elementData : Object[]
    size : int
    trimToSize()
    ensureCapacity(arg0 : int)
    size() : int
    isEmpty() : boolean
    contains(arg0 : Object) : boolean
    indexOf(arg0 : Object) : int
    lastIndexOf(arg0 : Object) : int
    clone() : Object
    toArray() : Object[]
    toArray(arg0 : T[]) : T[]
    get(arg0 : int) : E
    set(arg0 : int, arg1 : E) : E
    add(arg0 : E) : boolean
    add(arg0 : int, arg1 : E)
    remove(arg0 : int) : E
    remove(arg0 : Object) : boolean
    fastRemove(arg0 : int)
    clear()
    addAll(arg0 : Collection<?>) : boolean
    addAll(arg0 : int, arg1 : Collection<?>) : boolean
    removeRange(arg0 : int, arg1 : int)
    RangeCheck(arg0 : int)
    writeObject(arg0 : ObjectOutputStream)
    readObject(arg0 : ObjectInputStream)
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // java.util.List - c120 [label=<
    «interface»
    List<E>
    size() : int
    isEmpty() : boolean
    contains(arg0 : Object) : boolean
    iterator() : Iterator<E>
    toArray() : Object[]
    toArray(arg0 : T[]) : T[]
    add(arg0 : E) : boolean
    remove(arg0 : Object) : boolean
    containsAll(arg0 : Collection<?>) : boolean
    addAll(arg0 : Collection<?>) : boolean
    addAll(arg0 : int, arg1 : Collection<?>) : boolean
    removeAll(arg0 : Collection<?>) : boolean
    retainAll(arg0 : Collection<?>) : boolean
    clear()
    equals(arg0 : Object) : boolean
    hashCode() : int
    get(arg0 : int) : E
    set(arg0 : int, arg1 : E) : E
    add(arg0 : int, arg1 : E)
    remove(arg0 : int) : E
    indexOf(arg0 : Object) : int
    lastIndexOf(arg0 : Object) : int
    listIterator() : ListIterator<E>
    listIterator(arg0 : int) : ListIterator<E>
    subList(arg0 : int, arg1 : int) : List<E>
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c120 [label=<
    «interface»
    List<E>
    size() : int
    isEmpty() : boolean
    contains(arg0 : Object) : boolean
    iterator() : Iterator<E>
    toArray() : Object[]
    toArray(arg0 : T[]) : T[]
    add(arg0 : E) : boolean
    remove(arg0 : Object) : boolean
    containsAll(arg0 : Collection<?>) : boolean
    addAll(arg0 : Collection<?>) : boolean
    addAll(arg0 : int, arg1 : Collection<?>) : boolean
    removeAll(arg0 : Collection<?>) : boolean
    retainAll(arg0 : Collection<?>) : boolean
    clear()
    equals(arg0 : Object) : boolean
    hashCode() : int
    get(arg0 : int) : E
    set(arg0 : int, arg1 : E) : E
    add(arg0 : int, arg1 : E)
    remove(arg0 : int) : E
    indexOf(arg0 : Object) : int
    lastIndexOf(arg0 : Object) : int
    listIterator() : ListIterator<E>
    listIterator(arg0 : int) : ListIterator<E>
    subList(arg0 : int, arg1 : int) : List<E>
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; } diff --git a/testdata/dot-ref/Irp.dot b/testdata/dot-ref/Irp.dot index a077ba5..3987c46 100644 --- a/testdata/dot-ref/Irp.dot +++ b/testdata/dot-ref/Irp.dot @@ -16,6 +16,6 @@ digraph G { //IrpApplication extends Application c0:p -> c1:p [dir=back,arrowtail=empty]; // Main DEPEND IrpApplication - c2:p -> c1:p [taillabel="", label="«friend»", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed]; + c2:p -> c1:p [taillabel="", label="«friend»", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed]; } diff --git a/testdata/dot-ref/MyVector.dot b/testdata/dot-ref/MyVector.dot index 5fcd14c..1ccce07 100644 --- a/testdata/dot-ref/MyVector.dot +++ b/testdata/dot-ref/MyVector.dot @@ -20,10 +20,10 @@ digraph G { // java.util.Vector c5 [label=<
    Vector<E>
    # elementData : Object[]
    # elementCount : int
    # capacityIncrement : int
    - serialVersionUID : long
    + copyInto(arg0 : Object[])
    + trimToSize()
    + ensureCapacity(arg0 : int)
    - ensureCapacityHelper(arg0 : int)
    + setSize(arg0 : int)
    + capacity() : int
    + size() : int
    + isEmpty() : boolean
    + elements() : Enumeration<E>
    + contains(arg0 : Object) : boolean
    + indexOf(arg0 : Object) : int
    + indexOf(arg0 : Object, arg1 : int) : int
    + lastIndexOf(arg0 : Object) : int
    + lastIndexOf(arg0 : Object, arg1 : int) : int
    + elementAt(arg0 : int) : E
    + firstElement() : E
    + lastElement() : E
    + setElementAt(arg0 : E, arg1 : int)
    + removeElementAt(arg0 : int)
    + insertElementAt(arg0 : E, arg1 : int)
    + addElement(arg0 : E)
    + removeElement(arg0 : Object) : boolean
    + removeAllElements()
    + clone() : Object
    + toArray() : Object[]
    + toArray(arg0 : T[]) : T[]
    + get(arg0 : int) : E
    + set(arg0 : int, arg1 : E) : E
    + add(arg0 : E) : boolean
    + remove(arg0 : Object) : boolean
    + add(arg0 : int, arg1 : E)
    + remove(arg0 : int) : E
    + clear()
    + containsAll(arg0 : Collection<?>) : boolean
    + addAll(arg0 : Collection<?>) : boolean
    + removeAll(arg0 : Collection<?>) : boolean
    + retainAll(arg0 : Collection<?>) : boolean
    + addAll(arg0 : int, arg1 : Collection<?>) : boolean
    + equals(arg0 : Object) : boolean
    + hashCode() : int
    + toString() : String
    + subList(arg0 : int, arg1 : int) : List<E>
    # removeRange(arg0 : int, arg1 : int)
    - writeObject(arg0 : ObjectOutputStream)
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // java.util.List - c6 [label=<
    «interface»
    List<E>
    + size() : int
    + isEmpty() : boolean
    + contains(arg0 : Object) : boolean
    + iterator() : Iterator<E>
    + toArray() : Object[]
    + toArray(arg0 : T[]) : T[]
    + add(arg0 : E) : boolean
    + remove(arg0 : Object) : boolean
    + containsAll(arg0 : Collection<?>) : boolean
    + addAll(arg0 : Collection<?>) : boolean
    + addAll(arg0 : int, arg1 : Collection<?>) : boolean
    + removeAll(arg0 : Collection<?>) : boolean
    + retainAll(arg0 : Collection<?>) : boolean
    + clear()
    + equals(arg0 : Object) : boolean
    + hashCode() : int
    + get(arg0 : int) : E
    + set(arg0 : int, arg1 : E) : E
    + add(arg0 : int, arg1 : E)
    + remove(arg0 : int) : E
    + indexOf(arg0 : Object) : int
    + lastIndexOf(arg0 : Object) : int
    + listIterator() : ListIterator<E>
    + listIterator(arg0 : int) : ListIterator<E>
    + subList(arg0 : int, arg1 : int) : List<E>
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c6 [label=<
    «interface»
    List<E>
    + size() : int
    + isEmpty() : boolean
    + contains(arg0 : Object) : boolean
    + iterator() : Iterator<E>
    + toArray() : Object[]
    + toArray(arg0 : T[]) : T[]
    + add(arg0 : E) : boolean
    + remove(arg0 : Object) : boolean
    + containsAll(arg0 : Collection<?>) : boolean
    + addAll(arg0 : Collection<?>) : boolean
    + addAll(arg0 : int, arg1 : Collection<?>) : boolean
    + removeAll(arg0 : Collection<?>) : boolean
    + retainAll(arg0 : Collection<?>) : boolean
    + clear()
    + equals(arg0 : Object) : boolean
    + hashCode() : int
    + get(arg0 : int) : E
    + set(arg0 : int, arg1 : E) : E
    + add(arg0 : int, arg1 : E)
    + remove(arg0 : int) : E
    + indexOf(arg0 : Object) : int
    + lastIndexOf(arg0 : Object) : int
    + listIterator() : ListIterator<E>
    + listIterator(arg0 : int) : ListIterator<E>
    + subList(arg0 : int, arg1 : int) : List<E>
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // java.util.RandomAccess - c7 [label=<
    «interface»
    RandomAccess
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c7 [label=<
    «interface»
    RandomAccess
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // java.lang.Cloneable - c8 [label=<
    «interface»
    Cloneable
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c8 [label=<
    «interface»
    Cloneable
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; } diff --git a/testdata/dot-ref/RunnableRef.dot b/testdata/dot-ref/RunnableRef.dot index d416dd4..80c99ed 100644 --- a/testdata/dot-ref/RunnableRef.dot +++ b/testdata/dot-ref/RunnableRef.dot @@ -12,6 +12,6 @@ digraph G { // test.RunnableRef DEPEND java.lang.Runnable c103:p -> c104:p [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed]; // java.lang.Runnable - c104 [label=<
    «interface»
    Runnable
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c104 [label=<
    «interface»
    Runnable
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; } diff --git a/testdata/dot-ref/Style.dot b/testdata/dot-ref/Style.dot index 507a52e..c194108 100644 --- a/testdata/dot-ref/Style.dot +++ b/testdata/dot-ref/Style.dot @@ -8,7 +8,7 @@ digraph G { edge [fontname="arialbd",fontsize=10,labelfontname="arialbd",labelfontsize=10]; node [fontname="arial",fontsize=10,shape=plaintext]; // net.sf.whatever.test.AbstractBase - c106 [label=<
    «base»
    AbstractBase
    net.sf.whatever.test
    {since = 1.0}
    field : int
    {since = 1.5}
    abstractMethod()
    concreteMethod() : int
    >, fontname="arial", fontcolor="black", fontsize=9.0]; + c106 [label=<
    «base»
    AbstractBase
    net.sf.whatever.test
    {since = 1.0}
    field : int
    {since = 1.5}
    abstractMethod()
    concreteMethod() : int
    >, fontname="arial", fontcolor="black", fontsize=9.0]; // net.sf.whatever.test.Composite c107 [label=<
    Composite
    net.sf.whatever.test
    >, fontname="arial", fontcolor="black", fontsize=9.0]; // net.sf.whatever.test.Style diff --git a/testdata/dot-ref/ViewColors.dot b/testdata/dot-ref/ViewColors.dot index c892d33..db991dd 100644 --- a/testdata/dot-ref/ViewColors.dot +++ b/testdata/dot-ref/ViewColors.dot @@ -28,6 +28,6 @@ digraph G { // gr.spinellis.basic.product.Category DEPEND java.util.List c168:p -> c202:p [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed]; // java.util.List - c202 [label=<
    «interface»
    List<E>
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c202 [label=<
    «interface»
    List<E>
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; } diff --git a/testdata/dot-ref/ViewInterfaces.dot b/testdata/dot-ref/ViewInterfaces.dot index a43356e..8d7a94d 100644 --- a/testdata/dot-ref/ViewInterfaces.dot +++ b/testdata/dot-ref/ViewInterfaces.dot @@ -12,11 +12,11 @@ digraph G { // gr.spinellis.iface.classes.DirectImplementor c535 [label=<
    DirectImplementor
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // gr.spinellis.iface.classes.SubSubFace - c537 [label=<
    «interface»
    SubSubFace
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c537 [label=<
    «interface»
    SubSubFace
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // gr.spinellis.iface.classes.SubFace - c538 [label=<
    «interface»
    SubFace
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c538 [label=<
    «interface»
    SubFace
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // gr.spinellis.iface.classes.Face - c539 [label=<
    «interface»
    Face
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c539 [label=<
    «interface»
    Face
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; //gr.spinellis.iface.classes.FarImplementor implements gr.spinellis.iface.classes.SubSubFace c537:p -> c534:p [dir=back,arrowtail=empty,style=dashed]; //gr.spinellis.iface.classes.DirectImplementor implements gr.spinellis.iface.classes.Face diff --git a/testdata/dot-ref/advrel.dot b/testdata/dot-ref/advrel.dot index fba4643..d897334 100644 --- a/testdata/dot-ref/advrel.dot +++ b/testdata/dot-ref/advrel.dot @@ -18,7 +18,7 @@ digraph G { // ChannelIterator c21 [label=<
    ChannelIterator
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // URLStreamHandler - c22 [label=<
    «interface»
    URLStreamHandler
    OpenConnection()
    parseURL()
    setURL()
    toExternalForm()
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c22 [label=<
    «interface»
    URLStreamHandler
    OpenConnection()
    parseURL()
    setURL()
    toExternalForm()
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; //SetTopController extends Controller c17:p -> c20:p [dir=back,arrowtail=empty]; //SetTopController extends EmbeddedAgent @@ -28,6 +28,6 @@ digraph G { // SetTopController NAVASSOC PowerManager c20:p -> c19:p [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open]; // ChannelIterator DEPEND SetTopController - c21:p -> c20:p [taillabel="", label="«friend»", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed]; + c21:p -> c20:p [taillabel="", label="«friend»", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed]; } diff --git a/testdata/dot-ref/catalina.dot b/testdata/dot-ref/catalina.dot index 48f45d1..9db3af7 100644 --- a/testdata/dot-ref/catalina.dot +++ b/testdata/dot-ref/catalina.dot @@ -16,17 +16,17 @@ digraph G { // ResponseWrapper c34 [label=<
    ResponseWrapper
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // HttpResponse - c35 [label=<
    «interface»
    HttpResponse
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c35 [label=<
    «interface»
    HttpResponse
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // ResponseBase c36 [label=<
    ResponseBase
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // HttpServletResponse - c37 [label=<
    «interface»
    HttpServletResponse
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c37 [label=<
    «interface»
    HttpServletResponse
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // ResponseFacade c38 [label=<
    ResponseFacade
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // ServletResponse - c39 [label=<
    «interface»
    ServletResponse
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c39 [label=<
    «interface»
    ServletResponse
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // Response - c40 [label=<
    «interface»
    Response
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c40 [label=<
    «interface»
    Response
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; //HttpResponseBase extends ResponseBase c36:p -> c31:p [dir=back,arrowtail=empty]; //HttpResponseBase implements HttpResponse diff --git a/testdata/dot-ref/classadd.dot b/testdata/dot-ref/classadd.dot index 6cd5a67..4a86203 100644 --- a/testdata/dot-ref/classadd.dot +++ b/testdata/dot-ref/classadd.dot @@ -8,6 +8,6 @@ digraph G { edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10]; node [fontname="Helvetica",fontsize=10,shape=plaintext]; // ActionQueue - c47 [label=<
    «container»
    ActionQueue
    {version = 3.2}
    add(a : Action)
    add(a : Action, n : int)
    {version = 1.0}
    remove(n : int)
    «query»
    length() : int
    «helper functions»
    reorder()
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c47 [label=<
    «container»
    ActionQueue
    {version = 3.2}
    add(a : Action)
    add(a : Action, n : int)
    {version = 1.0}
    remove(n : int)
    «query»
    length() : int
    «helper functions»
    reorder()
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; } diff --git a/testdata/dot-ref/java5.dot b/testdata/dot-ref/java5.dot index 79238d2..0ce46be 100644 --- a/testdata/dot-ref/java5.dot +++ b/testdata/dot-ref/java5.dot @@ -10,6 +10,6 @@ digraph G { // Java5 c74 [label=<
    Java5
    ~ state : Java5.States
    - specifiedPackages : Set<String>
    + printAll(args : String[])
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // Java5.States - c75 [label=<
    «enumeration»
    States
    start
    dash
    colon
    space
    open
    w
    close
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c75 [label=<
    «enumeration»
    States
    start
    dash
    colon
    space
    open
    w
    close
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; } diff --git a/testdata/dot-ref/strip.dot b/testdata/dot-ref/strip.dot index 4a048b3..8faf651 100644 --- a/testdata/dot-ref/strip.dot +++ b/testdata/dot-ref/strip.dot @@ -10,6 +10,6 @@ digraph G { // Java5 c85 [label=<
    Java5
    ~ state : Java5.States
    + specifiedPackages : Set<String>
    + printAll(args : String[])
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; // Java5.States - c86 [label=<
    «enumeration»
    States
    start
    dash
    colon
    space
    open
    w
    close
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; + c86 [label=<
    «enumeration»
    States
    start
    dash
    colon
    space
    open
    w
    close
    >, fontname="Helvetica", fontcolor="black", fontsize=10.0]; }