[
Lists Home |
Date Index |
Thread Index
]
- From: "Norbert H. Mikula" <nmikula@edu.uni-klu.ac.at>
- To: Peter Murray-Rust <Peter@ursus.demon.co.uk>
- Date: Mon, 24 Mar 1997 08:46:41 -0800
Peter Murray-Rust wrote:
> NXP has an interface Esis, with function such as open_tag, close_tag,
> process_instruction, etc. [I think they would be more properly called
> start_element??].
You are absolutely right !
> JUMBO uses this to build up a Vector representing the
> ESIS event stream, somthing like:
> "_START_TAG" "CML" AttributeList "_START_TAG" "MOL" ... "_END_TAG" "MOL"...
> JUMBO then builds a tree out of this, adding attributes, etc.
>
> NXP has a class XML which is built by JACC. This contains inter alia
> an Esis_Stdout object (implements Esis). There are several objects in XML
> which are private and therefore not easily accessed -
Would it be possible to send me a list of those objects ?
> I think they should
> have accessors, but at present I have subclassed it to PMRXML, which has
> the requisiste accessors.
>
> My test program then creates a PMRXML object, and extracts the event stream
> which is then passed to JUMBO's existing tree object:
> NXP.PMRXML xml = new PMRXML(NXP.Streams.load_File(file, true));
> pmr.chemime.ChemTree chemTree = new ChemTree(xml.getStreamVector());
> pmr.sgml.GeneralTOC toc = chemTree.createGeneralTOC(3);
>
> Comments: I have still to work out what whitespace NXP creates - there seems
> to be a lot of content which is simply white. Maybe we have to address
> COLLAPSE and KEEP at this stage?
As soon as I will know how the standard defines the treatment of
whitespace
in all those scenarios, for instance w/ DTD w/o DTD, in element content
etc.
I will implement it that way. (I admit that the whitespace is really
annoying, but
I didn't want to waste my time with experiments.)
> Also it isn't easy to extract certain
> info - for example I had to hack XML.java to get the doctype - this isn't a good
> idea and we need an accessor.
People didn't seem to be too interested in my idea of an interface for
passing along a complete grove. At least I didn't get too much
feedback.
> I am also still not clear how NXP does (or should)
> behave with:
> <!DOCTYPE CML>
> and <!DOCTYPE CML SYSTEM "cml.dtd">
> (the default on the latter is to try to validate, I think, even if validate
> is set to false. I'd prefer to be able to turn off validation, but I may have
> missed something).
I will check it. Thank's for pointing it out to me !
> In general I'd like to be able to treat NXP as a black box, and subclass
> my Esis object. That could mean passing it as an argument to XML, e.g.:
>
> public class PMREsis implements Esis {
> public void open_tag(String name) {
> ...
> }
> }
>
> PMREsis esis = new PMREsis();
> NXP.XML xml = new NXP.XML(esis, NXP.Streams.load_File(file, true))
> pmr.sgml.SGMLTree tree = new pmr.sgml.SGMLTree(xml);
That's the basic idea that I had in mind. We really must continue with
working on our unified interface for XML/Java based applications.
--
Best regards,
Norbert H. Mikula
=====================================================
= SGML, DSSSL, Intra- & Internet, AI, Java
=====================================================
= mailto:nmikula@edu.uni-klu.ac.at
= http://www.edu.uni-klu.ac.at/~nmikula
=====================================================
xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@ic.ac.uk)
- References:
- JUMBO
- From: Peter@ursus.demon.co.uk (Peter Murray-Rust)
|