You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Elena Litani <el...@ca.ibm.com> on 2001/11/20 21:22:33 UTC

Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

We are about to make XNI changes to support Infoset augmentations in the
document pipeline. 
As you know, the problem of exposing infoset augmentations in XNI was
raised because XML Schema allows to augment the infoset and requires
parsers to expose PSVI. 

AndyC came up with a general solution what will allow different
components to augment the infoset in different way and pass it along the
document pipeline.

The proposal is to add an InfosetAugmentations parameter to every method
in XMLDocumentHandler that passes infoset info, for example:
public void startElement(QName element, XMLAttributes attributes,
InfosetAugmentations augmentations);

We will also add an InfosetAugmentations to each attribute in the
XMLAttributes interface.


The InfosetAugmentations interface will allow users to add/update/remove
augmentations using the following methods:
public Object getItem(String key);
public Object putItem (String key, Object item);
public boolean isRecognizedItem (String key);
public void removeItem (String key);

We also plan to add to XNI some PSVI related interfaces: those would
live in the xni.psvi package and will be treated as an extension to the
core XNI interfaces.

Any comments?

-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by "Theodore W. Leung" <tw...@sauria.com>.
I think that this is a good approach.

Ted

On Tue, 2001-11-20 at 12:22, Elena Litani wrote:
> We are about to make XNI changes to support Infoset augmentations in the
> document pipeline. 
> As you know, the problem of exposing infoset augmentations in XNI was
> raised because XML Schema allows to augment the infoset and requires
> parsers to expose PSVI. 
> 
> AndyC came up with a general solution what will allow different
> components to augment the infoset in different way and pass it along the
> document pipeline.
> 
> The proposal is to add an InfosetAugmentations parameter to every method
> in XMLDocumentHandler that passes infoset info, for example:
> public void startElement(QName element, XMLAttributes attributes,
> InfosetAugmentations augmentations);
> 
> We will also add an InfosetAugmentations to each attribute in the
> XMLAttributes interface.
> 
> 
> The InfosetAugmentations interface will allow users to add/update/remove
> augmentations using the following methods:
> public Object getItem(String key);
> public Object putItem (String key, Object item);
> public boolean isRecognizedItem (String key);
> public void removeItem (String key);
> 
> We also plan to add to XNI some PSVI related interfaces: those would
> live in the xni.psvi package and will be treated as an extension to the
> core XNI interfaces.
> 
> Any comments?
> 
> -- 
> Elena Litani / IBM Toronto
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Petr Kuzel wrote:
> 
> Arnaud Le Hors wrote:
> >
> > XNI also needs to be extended so that the actual encoding is passed to
> > the application. This is necessary to implement DOM Level 3 which
> > exposes both the encoding specified in the XML declaration (if any) and
> > the actual encoding.
> 
> compare (actual)
> 
>   startDocument(..., String encoding), startEntity(..., String encoding) etc,
> 
> with (specified)
> 
>   textDecl(..., Stringencoding), xmlDecl(..., String encoding, ...)
> 

You're right! Cool, we're all set then.
Thanks.
--
Arnaud  Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by Petr Kuzel <Pe...@sun.com>.
Arnaud Le Hors wrote:
> 
> XNI also needs to be extended so that the actual encoding is passed to
> the application. This is necessary to implement DOM Level 3 which
> exposes both the encoding specified in the XML declaration (if any) and
> the actual encoding.

compare (actual)

  startDocument(..., String encoding), startEntity(..., String encoding) etc,

with (specified)

  textDecl(..., Stringencoding), xmlDecl(..., String encoding, ...)


  Cc.
-- 
<address>
<a href="mailto:pkuzel@sun.com">Petr Kuzel</a> at Sun Microsystems
: <a href="http://xml.netbeans.org/">XML module</a> and
: <a href="http://jini.netbeans.org/">Jini</a> developer.</address>

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by Arnaud Le Hors <le...@us.ibm.com>.
XNI also needs to be extended so that the actual encoding is passed to
the application. This is necessary to implement DOM Level 3 which
exposes both the encoding specified in the XML declaration (if any) and
the actual encoding.
-- 
Arnaud  Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by Andy Clark <an...@apache.org>.
Elena Litani wrote:
> Ok, we will add Augmentations parameter on each XMLDocumentHandler call. 

I actually like this name. Something must be wrong with me... ;-)

-AndyC


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by Elena Litani <el...@ca.ibm.com>.
Arnaud Le Hors wrote:
> 
> I wonder if it wouldn't be simpler to add a general extension mechanism
> to the whole API. 

I like your solution.

> As for the type of interface you need, this can be done with something
> which is just like the InfosetAugmentations interface Elena is
> proposing, but you call it AdditionalArguments or something more general
> like that.

Ok, we will add Augmentations parameter on each XMLDocumentHandler call. 

-- 
Elena Litani / IBM Toronto

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Proposed XNI changes [was: [Xerces2] InfoSet Augmentations in XNI]

Posted by Arnaud Le Hors <le...@us.ibm.com>.
I wonder if it wouldn't be simpler to add a general extension mechanism
to the whole API. Think about variable arguments. We add an extra
argument to every method which can be used to pass extra arguments. We
don't need to limit this to PSVI augmentations. It's a general mechanism
that can carry any piece of additional information the implementation
wants/needs. Then we can use that to carry the PSVI augmentations, as
one application of this mechanism.

As for the type of interface you need, this can be done with something
which is just like the InfosetAugmentations interface Elena is
proposing, but you call it AdditionalArguments or something more general
like that.
-- 
Arnaud  Le Hors - IBM, XML Standards Strategy Group / W3C AC Rep.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org