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 Michael Glavassevich <mr...@ca.ibm.com> on 2011/03/14 18:53:50 UTC

Re: willing to contribute Xerces2

Hi Ishara,

That's about right.

To be more precise the module (XNI component) needs to:

1) Normalize the value of each xml:id attribute.
2) Perform ID type assignment with the normalized value (in other words
give it an ID type if it doesn't already have one).
3) Report an error if the constraints on the xml:id are violated (in other
words validate the xml:id).
4) Pass the processed xml:id attribute (and other XNI events) to the next
component in the pipeline.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

ishara karunarathna <is...@gmail.com> wrote on 02/20/2011 11:12:48
AM:

> Hi Michael,
>
> I went through these [1] [2] articles and some other documents.
>
> And I think  xml:id provides a unique element identification
> mechanism. And it use to over come some pitfalls in
> DTD and XML schema based identifiers.
>
> And adding support for xml:id to Xerces we have to come up with a
> module that can.
>
> 1.Access to the xml:id and identify it.
> 2.validate the xml:id.
> 3.Parse it to the other processing part.
>
> This is how I understand the problem and could you please tell me
> weather I am on the correct path and how should I improve the background.
>
> Thank you.
> Regards,
> Ishara Karunarathna.
>
> [1] http://www.w3.org/TR/2005/CR-xml-id-20050208/
> [2] http://www.xml.com/pub/a/ws/2005/02/23/salz.html

Re: willing to contribute Xerces2

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Ishara,

ishara karunarathna <is...@gmail.com> wrote on 04/08/2011 01:41:03
PM:

> Hi Michael,
>
> I uploaded my Gsoc Proposal to the Gsoc site.

Yes, I see that it's up there now. Looking forward to reviewing it.

> And I would like to thank you for the support and the guidance you gave.

Your welcome.

> P.S. - Michael, I have included you as the mentor for the project.
>
>
> Thank You,
> Ishara Karunarathna.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Re: willing to contribute Xerces2

Posted by ishara karunarathna <is...@gmail.com>.
Hi Michael,

I uploaded my Gsoc Proposal to the Gsoc site.
And I would like to thank you for the support and the guidance you gave.


P.S. - Michael, I have included you as the mentor for the project.


Thank You,
Ishara Karunarathna.

Re: willing to contribute Xerces2

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Ishara,

Your proposal should have a high level design of the XNI component which
would support xml:id and cover the functional requirements we've been
discussing. It should also contain some detail about how the component
would be integrated into the parser's pipeline as well as how the user
would enable this feature (probably just need a new feature string; some
examples here [1]) through the SAX and DOM parser APIs.

If you're looking for examples of existing components there are several in
the org.apache.xerces.impl package.
org.apache.xerces.parsers.XML11Configuration would be a good class to look
at to get a feel for how XNI components are integrated together to form a
pipeline.

Thanks.

[1] http://xerces.apache.org/xerces2-j/features.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

ishara karunarathna <is...@gmail.com> wrote on 03/28/2011 06:55:21
AM:

> Hi Michael,
>
> At the moment I am Xerces source code and studying how should it be
> implemented. but still I haven't clear idea how to start
> and I don't have idea what implementation detail should be included
> to the proposal.
>
> so could you please let me know how to start this
> what kind of implementation detail should be added to the proposal.
> what are the things I should further study.
>
>
> Thank you,
> Ishara Karunarathna.

Re: willing to contribute Xerces2

Posted by ishara karunarathna <is...@gmail.com>.
Hi Michael,

At the moment I am Xerces source code and studying how should it be
implemented. but still I haven't clear idea how to start
and I don't have idea what implementation detail should be included to the
proposal.

so could you please let me know how to start this
what kind of implementation detail should be added to the proposal.
what are the things I should further study.


Thank you,
Ishara Karunarathna.

Re: willing to contribute Xerces2

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Ishara,

ishara karunarathna <is...@gmail.com> wrote on 03/17/2011 01:01:06
PM:

> Hi Micheal,
>
> Here is the basic idea I have to implement xml:id component.
> Implementing xml:id support as a  separate component  be the xml:id
> processor. And it will implement the following requirements.
>
> 1.    Normalize the value of each xml:id attribute.
> Normalize each xml:id attributes according to the ID type attributes
> normalization rules [1] and then The infoset normalized value
> property is updated with the normalized value.
>
> 2.    Perform ID type assignment with the normalized value (in other
> words give it an ID type if it doesn't already have one).
> This can be done by making the type of the attribute "ID" in the
> infoset or post schema validation infoset (PSVI) and I think
> org.apache.xerces.xs package me be useful to do this.
>
> 3.    Report an error if the constraints on the xml:id are violated
> (in other words validate the xml:id).
> For validating has to be done in DTD, XML Schema and RELAX NG based
> validating techniques.

I was referring to these constraints in the xml:id spec. Though many of the
rules may be similar this is separate from DTD, XML Schema, etc...
validation.

"An xml:id processor must assure that the following constraints hold for
all xml:id attributes:
  * The normalized value of the attribute is an NCName according to the
Namespaces in XML Recommendation which has the same version as the document
in which this attribute occurs (NCName for XML 1.0, or NCName for XML 1.1).
  * The declared type of the attribute, if it has one, is "ID". All
declarations for xml:id attributes must specify "ID" as the type of the
attribute.

An xml:id processor should assure that the following constraint holds:
  * The values of all attributes of type "ID" (which includes all xml:id
attributes) within a document are unique."

> 4.    Pass the processed xml:id attribute (and other XNI events) to
> the next component in the pipeline.
> XNI information set events that are generated by the scanner is
> taking as the input of the processor and the processed event is
> passing to the next component in the pipeline.
>
> Could you tell me whether my approach is ok or the required
> modifications here. Any existing component can be use to model this
> module. (At the moment I checked how xinclude component works)

I think you've got the general idea for the component.

> And any reference to study how normal attributes are normalized and
> forward to the next component is implemented in Xerces.

You may want to have a look at
org.apache.xerces.impl.dtd.XMLDTDValidator.normalizeAttrValue().

> Thank you.
> Ishara Karunarathna.
> [1] http://www.w3.org/TR/REC-xml/#AVNormalize

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Re: willing to contribute Xerces2

Posted by ishara karunarathna <is...@gmail.com>.
Hi Micheal,

Here is the basic idea I have to implement xml:id component. Implementing
xml:id support as a  separate component  be the xml:id processor. And it
will implement the following requirements.

1.    Normalize the value of each xml:id attribute.
Normalize each xml:id attributes according to the ID type attributes
normalization rules [1] and then The infoset normalized value property is
updated with the normalized value.

2.    Perform ID type assignment with the normalized value (in other words
give it an ID type if it doesn't already have one).
This can be done by making the type of the attribute "ID" in the infoset or
post schema validation infoset (PSVI) and I think org.apache.xerces.xs
package me be useful to do this.

3.    Report an error if the constraints on the xml:id are violated (in
other words validate the xml:id).
For validating has to be done in DTD, XML Schema and RELAX NG based
validating techniques.

4.    Pass the processed xml:id attribute (and other XNI events) to the next
component in the pipeline.
XNI information set events that are generated by the scanner is taking as
the input of the processor and the processed event is passing to the next
component in the pipeline.

Could you tell me whether my approach is ok or the required modifications
here. Any existing component can be use to model this module. (At the moment
I checked how xinclude component works)

And any reference to study how normal attributes are normalized and forward
to the next component is implemented in Xerces.

Thank you.
Ishara Karunarathna.
[1] http://www.w3.org/TR/REC-xml/#AVNormalize