[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Simple API

  • From: James Clark <jjc@j...>
  • To: xml-dev@i...
  • Date: Tue, 25 Mar 1997 18:55:30 +0700

namednodelist
At 09:52 25/03/97 GMT, Peter Murray-Rust wrote:

>My own suggestion is that we should produce a ReallySimple API independently
>of the grove approach.

It's perfectly possible to have a "ReallySimple API" that is based on
groves, for example:

public interface Builder {
    SgmlDocument build(String url);
}

public interface Node {
    public abstract Node getParent();
    public abstract NodeList getChildren();
}

public interface NodeList {
    public abstract Node getItem(int i);
    public abstract int getCount();
}

public interface NamedNodeList {
    public abstract Node getItem(String name);
    public abstract NodeList toNodeList();
}

public interface SgmlDocument extends Node {
    public abstract NodeList getProlog();
    public abstract NodeList getEpilog();
    public abstract Element getDocumentElement();
    public abstract NamedNodeList getElements();
    public abstract NamedNodeList getEntities();
}

public interface Element extends Node {
    public abstract String getId();
    public abstract String getGi();
    public abstract NodeList getContent();
    public abstract NamedNodeList getAttributes();
    public abstract boolean getMustOmitEndTag();
}

public interface DataChar extends Node {
    public abstract char getChar();
}

public interface Pi extends Node {
    public abstract String getSystemData();
}

public interface ExternalData extends Node {
    public abstract Entity getEntity();
}

public interface AttributeAssignment extends Node {
    public abstract NodeList getValue();
    public abstract boolean getImplied();
    public abstract String getName();
}

public interface AttributeValueToken extends Node {
    public abstract String getToken();
    public abstract Element getReferent();
    public abstract Entity getEntity();
    public abstract Notation getNotation();
}

public interface Entity extends Node {
    public abstract String getName();
    public abstract ExternalId getExternalId();
    public abstract String getText();
    public abstract Notation getNotation();
}

public interface ExternalId extends Node {
    public abstract String getSystemId();
    public abstract String getPublicId();
}

public interface Notation extends Node {
    public abstract String getName();
    public abstract ExternalId getExternalId();
}

Is that really so complicated?

James




xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.