Speakers: Mark Reinhold (MarkR) and Larry Cable (LarryC)
Moderator: Edward Ort (MDR-edort)
This is a moderated forum.
MDR-edort: Welcome to JavaTM Live.
Today's topic is XML and the Java 2 Platform. Our guests are Mark Reinhold
and Larry Cable. Both are working on adding XML support to the the Java 2
Platform. Mark is here. We're waiting for Larry. So let's begin. Who has
the first question?
Sasha Nakhimovsk: When will the XML packages become
a standard extension? How long will it take between the release of XSLT
recommendation and Sun's support for XSLT?
MarkR: We have several active efforts to add XML support to
the Java platform. As we announced at JavaOneSM, the first extension containing
"basic plumbing" APIs (i.e., a SAX parser and an implementation of the DOM)
is targeted for release near the end of this calendar year. We're tracking
the XSL/T work -- Larry Cable is a member of the W3C working group -- but I
really couldn't say exactly when we'll have support for that.
Byron: Is there a good place to find DTD's already
developed for various purposes and industries?
MarkR: You can find a large list of existing applications
of XML, including some schemas and DTDs, under the pages maintained by Robin
Cover for OASIS. I think the URL is oasis-open.org, or if you visit the W3C's
XML pages you can find a link there. Eventually xml.org will be a central
repository and registry of DTDs, but I don't think they have any available yet.
John Abjanic: Will there be a parsing API?
Chirokikh: You can also look at www.xml.com.
LarryC: The short answer is yes, the slightly longer
version of it is that the first release of the optional package for
XML will include support for the W3C DOM Level 1 Java programming language binding
and SAX V1.0 (from David Megginson & XML-DEV). These API's will have
a (pluggable) parser behind them.
John Abjanic: Will there be support for XML-schema
and XML-data in the API?
Mojo Jojo: What about Simple API for XML (SAX) 2.0 support?
MarkR: The initial extension will only support SAX and
DOM parsing. The XML data-binding project, which I'm leading, will support
schemas by compiling them into Java classes.
kuni: At JavaOne, you guys talked about a
mechanism you're developing to be able to bind XML to Java classes.
Any updates on this effort?
LarryC: What about SAX 2.0 support? Well we
are tracking the SAX 2.0 efforts, but we want to get our 1st release
out asap, if SAX 2.0 solidifies in time then we would consider it for
1.0, but at this point it's more likely that SAX 2.0 will come in a
revision of extension next year ...
David M: We have been using Document Object Model (DOM) and SAX parsers.
As documents get large the SAX parser gives us more scaleability, will you
be supporting both DOM and SAX?
LarryC: YES!
Malin: Will Sun provide an XSL engine?
MarkR: An update on binding: The JSR (Java Specification
Request) for this is just about ready to be submitted. Look for it on the
Java Community Process web site "real soon now." We'll also release a
whitepaper at the time of the submission.
Mike Azzi: In The JavaOne XML presentation you
mentioned support for the XML Schemas standards for application level parsing.
Is this going to be part of the first extension? What about support for DOM
level 2?
MarkR: No, support for schema-to-Java bindings will not be
part of the first extension. We'll support DOM level 2 once it's standardized,
but it seems to be pretty far from that point right now.
LarryC: Will we support XSL? The short answer is YES! The
longer answer is that we are in the early stages of planning, but what we
are most likely going to do is provide an XSL engine "invocation"
API as a std extension providing a portable API to invoke a Stylesheet on a
document. Also we would of course provide an implementation of an engine under
that ... but that will not happen until next year.
David: Is any plan to support XML ( with XSL ) web
browser for HotJavaTM or the Java Foundation Classes (JFC) Project Swing package?
ab: By when can we expect data-binding and schema support?
LarryC: Is there a plan to support XML/XSL in HotJava
or JFC Project Swing? There are no current plans,
however since the proposed extensions for
XML are 100%PureJavaTM, you will be able to use them in conjunction with both
environments ...
MarkR: We can't promise any dates for the data binding project
just yet. We're still in the prototyping stages, and besides the W3C XML Schema
working group is not expected to finish its work until the end of the year.
David M: Do your XML plans extend to the KJavaTM VM*?
Bram: Are you working with IBM (and their XML/XSL teams) to
develop these things, or are you re-engineering these from scratch?
ricardo: How often do you guys offer these sessions. I
am currently a new user trying to get a handle on the Java technology.
LarryC: Are we working with IBM? Yes, we work very closely with
IBM, and all of the other members of the W3C, and XML.ORG. We are also working
with a number of other experts as part of the JCP process to create the std
extensions.
MarkR: On KJava: Currently Larry and I are focussing our efforts
on the J2SE and EE (standard and enterprise) platforms. I've heard that the
KJava team is looking into XML support, but I don't know much about it.
MDR-edort: Response to Ricardo. We try to have these Java Live
session at least once a month. Sometime we'll hold them more often depending on
the availability of guests. We also hold online "Office Hours" sessions
that allow you to ask questions to authors of articles and tutorials on the JDC.
Byron: Could you elaborate more on what you mean by
"compiling them into Java classes"?
MojoJojo: I notice that mozilla.org has, as part of
its Java integration, a way to access DOM from applets. Will that be part of
the standard extension? I'd like the code I'm writing in the Java programming language
to do what my JavaScript code
can already do ...
LarryC: Re: Mozilla ... can you tell me more about the nature
of the integration, is it exposing the browsers DOM of the current page into
the Applet?
Sasha Nakhimovsk: Sun has an excellent tutorial on
using XML and the Sun parser, but there's no way right now to download the
entire tutorial. Could this be arranged?
MarkR: In answer to Byron: The basic idea of data binding
is to look at an XML schema and translate it into a set of Java classes that
reflect the structure and type information in the schema. The classes also
handle all of the messy parsing and formatting issues, so you can write an
XML-aware application without having to learn the SAX and DOM APIs. For more
information, you can see the slides from our JavaOne talk (under
http://java.sun.com/javaone) or the forthcoming JSR and whitepaper for
the data-binding project.
Mike Azzi: OK, here's a question that regards the
XML per se. But I thought you guys might be on the standards committee, and you
might know the answer to this. Is the XML standard ever going to allow parsed
data in the attribute field? This feature can be very useful in XML compliant
JavaServer PagesTM (JSP).
Bram: (Will this session be archived?)
LarryC: Re: tutorial download, that's something we have been
asked for before and we are working on it!!! .... so watch that space/URL!
MDR-edort: Answer to Bram. It will be archived immediately
after the session ends.
LarryC: MojoJojo: I don't think we have any plans to date
to expose the browsers DOM to an Applet as part of this effort ... but it's
something for us to think about!
kuni: I see that XSchema support is pending the
W3C WG's completion of the spec. At the XML BOF at JavaOne, you mentioned that
regular expression parsing would likely be added to the core API to support
XSchema in the future. Will this only become available in conjunction with
XSchema support?
MojoJojo: (Suffering from this chat client) ...
Mozilla's exposing the browser's DOM to an applet, yes. There's an MT related
restriction (only an event callback thread can use it, I think) for the moment.
Information available on-line, and some Sun folk are working on that part of
mozilla.
MarkR: In reply to Mike Azzi: I don't think that the XML spec
itself will ever have a richer notion of types for attribute values. In the
W3C Schema working group, however, we're working on draft specifications that
allow a fairly rich set of constraints to be expressed for both attribute values
and element content. (If this isn't what you mean by "parsed data,"
please elaborate.)
MDR-edort: To MojoJojo in ref to "suffering" ...
we're aware of the applet's problems and we're planning to provide a better
tool fairly soon.
LarryC: MojoJojo: that's what I thought they were doing ...
exposing the page DOM into the Applet ... that would require an extension to
the Applet API ... but it's worth thinking about since browsers have evolved
to a stage where this may be possible in a portable fashion.
MarkR: Re. regular expressions: There's been a lot of demand
for this feature over the years. Given the generality of regular expressions it
would be a bit odd, I think, to only support them as part of the data-binding
facility -- it really seems like something that belongs in the platform. It's
too early to say, however, in exactly what form regex support will appear.
MojoJojo: (To Edward O in ref to 'suffering') ...
good! It seems to die and hide data, plus scrolling one line sometimes jumps
a screen and hides what I was trying to see!
MDR-edort: You might try viewing the session in unformatted
mode.
LarryC: Who is using what; DOM (lvl 1 or 2)? SAX
(1.0 or 2.0)? ... XSL???
MDR-edort: I've heard about Project X. How does it fit into
your future plans?
LarryC: ProjectX is our technology release of SAX, DOM,
namespace and parser support. Our current plans are to use this as the basis
for the Std Extension Reference Implementation.
Byron: Thanks a lot MarkR, this is very helpful!
David: When will Project X be officially released?
LarryC: ProjectX is in TR2 (Technology Release 2) this is
available for free from our website, and is licensed such that it can be
used commercially. As I just stated we plan to use Project X as the basis
for the Reference Implementation of the Std Extension for parsing
(DOM, SAX ...) ... I can't say for certain when this RI will freeze ...
but I would predict around the end of this millenium or early in the next!
But you can start using it now!
MDR-edort: We've had a nice set of questions and answers so
far. But right now there's no question in the queue. So if anyone has a
question for Mark or Larry, ask it now.
Sasha Nakhimovsk: Are you monitoring/contributing to
xml-dev list?
Mike Azzi: What I meant by "parsed data"
is full XML Element nodes as an attribute that can be parsed. So that something
like JSP's <%= ... %> can be implemented straight in an XML way.
LarryC: Yes we are monitoring xml-dev ... but we are currently
focused on W3C ... Do you think we should be taking a more active role in that
forum?
MarkR: Parsed data: I think it would be pretty counter to
XML's goal of being (fairly) simple to be able to embed entire elements within
an attribute. I'll let Larry speak to the JSP issue.
LarryC: Re: an XML form of JSP Scriptlet expressions ... we
are currently thinking about an alternate syntax for scriptlet expressions in
attributes when the JSP is an XML document.
MDR-edort: What plans do you have for support of XML in
enterprise applications?
Mike Azzi: Are you contemplating any work on RDF
which is also an XML application?
MarkR: RDF: We're not quite sure what to make of this yet.
Some folks seem very, very interested and others not at all, so it's been hard
to gauge the demand. We're tracking the RDF work but at the moment we have
no concrete plans to support it.
LarryC: Re: XML support for Enterprise applications? Well the
std extension that Mark and I are currently working on are pretty much a
prerequisite for portable XML in any Java application. Once we have that in
place then we will be working to update the Java 2 Enterprise Edition to
provide greater support for using XML to describe and exchange enterprise
data, within and between enterprise applications. Possible areas are JMS
support, Enterprise JavaBeansTM (EJB) support, and JSP support. One of
the things I am looking at
is the relationship of XSLT to JSP ....
Sasha Nakhimovsk: Re: xml-dev list: yes, I think
it would be very useful if you/Sun were a presence there. Re: JSP: do you
anticipate that JSP pages will become well-formed XML documents?
MojoJojo: Larry asked who's using what. Right
now I'm mostly using SAX 1; it's simple enough, very low overhead, and gives
me all the data I need. SAX 2 lets me find out more about the parser; I can
take the default parser, ask if it validates, enable or disable validation,
all without getting tied to some particular parser. DOM is too fat for me; and
it's easy enough to make data structures that are much more efficient, and
which tie better to my own tasks. Where I use DOM is for quick'n'dirty stuff
where I'm working with small bits of data, and want a brainless printing scheme
that won't have errors. XSL/T I've only played with. It's great for those
dynamic content generation systems, where I construct a page description in
XML (data from databases, other websites, user session, etc) and turn it
to HTML as the last step. Other folk in my area are doing much more with it.
LarryC: Sasha, I'll take your advice and leap in! Re: JSP
as XML documents, yes that is the plan, we are still working out the details
of the mapping. the JSP1.1 spec should be updated in public draft within the
next couple of weeks.
LarryC: Thanks MojoJojo ... that's useful info.
MarkR: Re. the DOM: This is a pretty complicated API.
We've sometimes thought that it might be worth doing a highly simplified
parse-tree-based API for XML. Something vaguely like the DOM, but *much*
lighter in weight and much easier to understand and use. I'd be interested
to hear whether this is something that folks would like to see.
MDR-edort: The question queue is dry again. Any more
questions?
Hank Oxford: Re: what we're using... My comments
pretty much mirror MojoJojo's. We're primarily using SAX 1.0 here. As Mojo
said, we can more efficiently build our own structures with SAX than use the
DOM ones.
Anna: Answer to Larry's question on who is using
what? DOM 1.0 right now. Plan to use SAX 1.0 for some larger files Using
XSL-patterns to query the DOM. Question: Are there any plans for supporting
querying a DOM using XSL-patterns?
LarryC: That would be XQL.
Hank Oxford: Are you tracking the MDSAX/Coins work
at all? What about serialization using XML in general?
kuni: How about XLink and XPointer? Have you guys
begun looking at that yet?
LarryC: We are looking at both XLink and Xpointer and would
plan to provide support when they stabilize ... I think Xpointer is more likely
to do this before XLink which is more ambitious. What would your application
for them be?
MojoJojo: Mark asked about DOM -- or something
simpler. Seems to me that with the Java 2 collections, and classes for elements
and PIs, it's already almost there. If there were base classes for those
(and an interface for elements; I'll need my own base classes too!) then
just documenting a set of conventions would suffice ... if there were ways
to read and write the XML from such structures. I suspect I'd use that in
many places I use DOM. But I'd have to think about it. That wouldn't be a
"tree" that can be walked up and down.
MarkR: MDSAX/Coins -- yes, we're tracking this work.
Serialization -- It's often hard to discern what people mean by this.
If you mean replacing the platform's current serialization mechanism then
the answer is no, there's no way we're going to do that. The JFC Project Swing team has
been exploring some interesting strategies for archiving graphs of JavaBeansTM
in XML, and an outgrowth of the data-binding project may yield a more
general-purpose runtime archiver, but these aren't our top priorities
right now.
ricardo: Any suggestions on a easy-to-understand
reference manual for the Java programming language?
MarkR: MojoJojo -- thanks for the input on DOM. I agree
that leveraging the collections framework would be a good thing.
MDR-edort: You can find a number of links to good basic
Java material on the JDC.
MDR-edort: We're down to the last 10 minutes of the session.
If you've got any questions you'd like Mark or Larry to answer, please submit
them soon.
Sasha Nakhimovsk: Re: XSLT and JSP: there is a
significant overlap between them. I think XSLT spec says that
implementaions don't have to support extensions into any particular language,
but they may. If Sun provides an XSLT implementation that supports loading
and using JavaBeans wouldn't that be very close to JSP?
LarryC: Sasha, Eduardo and I (we authored the JSP spec) have
been working with the XSL developers to understand what the relationship
is between the two. We don't have an answer yet, but we do see a synergy. One
important thing to note is that although they do very similar things the
programming models are very different; with JSP it is very much centered
around a model where streams of characters are input/output effected by
an integrated (imperative) scripting language engine, XSLT on the other hand
is a declarative, transformation model, based on pattern matching on an XML
input document and generating a result tree. these models are sufficiently
different that the models themselves become significant in the decision of
which mechanism to choose to solve a particular problem! PHEW!
MDR-edort: With that, we'll end what has been an excellent
session. Thanks for your participation.
MojoJojo: Re XSL/T vs JSP/ASP ... there's a key
difference, a style sheet gets applied to a document (XML + XSL --> HTML) where
the JSP/ASP is just executed directly (JSP/ASP -->HTML). That is, XSL can
be applied to many pages; JSP to just one. Of course, sometimes I use XSL
to craft a custom page. But more typically I use some other component to
craft a custom input to a standard XSL stylesheet. While with JSP/ASP, the
"pagequot; itself is that component. (This ties into what Larry just
wrote ...) So when I design a section of a site, the interesting question
is how the overall application works. The workflow inside the site, if you
will.
LarryC: Mojojojo: Exactly!!! ... I think they
complement/co-exist!
MDR-edort: Now it's definitely the end of the session.
Thanks again.
MDR-edort: Last moderator (me) signing off. The forum is
now unmoderated
Forum closed at Thu Aug 5 15:25:11 1999
Max number of users at any time: 37
* As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual
machine for the Java platform.
Reader Feedback
Tell us what you think of this transcript.