You are viewing a plain text version of this content. The canonical link for it is here.
Posted to alexandria-dev@jakarta.apache.org by Er...@COFACE.COM on 2001/08/20 10:18:41 UTC

minor bugs in org.apache.tools.doclet.xml.XMLDoclet and javadocv04-draft.dtd

Hello,

I found the followings errors in the source of the class
org.apache.tools.doclet.xml.XMLDoclet.

1) method javadocXML :
the attribute specifiedArrays of the class RootDoc is empty. To get the
package, I use instead the méthod containingPackage of the class ClassDoc.

my code :

// Generate for packages.
// begin [ELG] : commented (no package return!)
//        for (int i = 0; i < packageArray.length; ++i) {
//            packageXML(packageArray[i]);
//        }
// end [ELG] : commented (no package return!)
// begin [ELG] : workaround
{
    ClassDoc[] classArray = root.specifiedClasses();
    Vector interfaceVector = new Vector();
    for (int i = 0; i < classArray.length; ++i) {
         packageXML(classArray[i].containingPackage());
    }
}
 // end [ELG] : workaround

2) method classXML

I change the line
atts.addAttribute(xmlns, localName, "extensiblity", "String",
extensibility);

to the line
atts.addAttribute(xmlns, localName, "extensibility", "String",
extensibility);

3) method methodXML

I change the line :
atts.addAttribute(xmlns, localName, "extensiblity", "String",
extensibility);

to the line
atts.addAttribute(xmlns, localName, "extensibility", "String",
extensibility);

4) method docXML

I protect the doc section in a CDATA section as I have problem with french
accents.

private void docXML(Doc doc) throws SAXException {
    String commentText = "";
    boolean createDoc = false;
    commentText = doc.commentText();
    if (! commentText.equals("")) {
        createDoc = true;
    }
    Tag[] tags = doc.tags();
    if (tags.length > 0) {
        createDoc = true;
    }
    if (createDoc) {
        cm.startElement(xmlns, localName, "doc", emptyAtts);
        if (! commentText.equals("")) {
            // begin [ELG]
            StringBuffer sb = new StringBuffer();
            sb.append("<![CDATA[");
            sb.append(commentText.toCharArray());
            sb.append("]]>");
            cm.characters( sb.toString().toCharArray(), 0, sb.length());
            // end [ELG]
        }
        for (int i = 0; i < tags.length; ++i) {
            tagXML(tags[i]);
        }
        cm.endElement(xmlns, localName, "doc");
    }
}

5) javadocv04-draft.dtd

in the declaration the element extends is not defined. I change it to
extend_classes (is it right ?).

<!ELEMENT innerclass (doc?,
                      extends?,
                      implements?,
                      field*,
                      constructor*,
                      method*)>


regards,
Eric

Eric Legoubin
Open Up
elegoubin@openup.fr



--------------------------------------------------------------------------
Pour  sécuriser  le commerce inter-entreprises, traditionnel ou sur le web,
le  Groupe  Coface  propose  @rating,  premier  système mondial de notation
d'entreprises accessible sur Internet au http://www.cofacerating.com

In   order   to   make   e-commerce   or  traditional  business-to-business
transactions  safe,  the  Coface  Group offers @rating, the first insurable
business rating on the web at http://www.cofacerating.com



---------------------------------------------------------------------
To unsubscribe, e-mail: alexandria-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: alexandria-dev-help@jakarta.apache.org