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 "Wei Duan (JIRA)" <xe...@xml.apache.org> on 2007/07/07 18:53:04 UTC

[jira] Created: (XERCESJ-1259) Add Functionality to

Add Functionality to 
---------------------

                 Key: XERCESJ-1259
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
             Project: Xerces2-J
          Issue Type: New Feature
            Reporter: Wei Duan




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Assigned: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich reassigned XERCESJ-1259:
---------------------------------------------

    Assignee: Michael Glavassevich

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.9.0
>            Reporter: Wei Duan
>            Assignee: Michael Glavassevich
>         Attachments: patch_7.8.txt
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1259.
-------------------------------------------

    Resolution: Fixed

Thanks Wei. I've committed your updates to SVN.

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.9.0
>            Reporter: Wei Duan
>            Assignee: Michael Glavassevich
>         Attachments: patch_7.8.txt
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519589 ] 

Michael Glavassevich commented on XERCESJ-1259:
-----------------------------------------------

Wei, I finally found some time to take a deeper look at your patch.  Here are some comments on the StreamFilter support and implementation of close().

Regarding StAXFilterParser:
- when a filtered XMLStreamReader is created it should be sitting on the first event which the StreamFilter accepts; in other words in the constructor you should be invoking the filter
- your implementations of next() and hasNext() recursively call themselves in an endless loop. think you probably meant super.next() and super.hasNext().
- hasNext() shouldn't advance the XMLStreamReader. It's just checking if there's more input; you probably don't need to override this method.
- next() should pass the next event to the StreamFilter instead of the current one and stop at END_DOCUMENT instead of letting it run passed the end which would result in a XMLStreamException (if you try to advance the underlying XMLStreamReader any further)
- think you also need to override nextTag() so that it also uses the StreamFilter

Regarding close(), I see that the implementation is currently calling cleanup() on the XMLParserConfiguration.  I think what we really need here is to recycle the XMLParserConfiguration so that it can be reused by a new XMLStreamReader returned from the XMLInputFactory.  This would be pretty important for performance when reading small documents since creating an XMLParserConfiguration is rather expensive.

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.9.0
>            Reporter: Wei Duan
>            Assignee: Michael Glavassevich
>         Attachments: patch_7.8.txt
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Wei Duan (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wei Duan updated XERCESJ-1259:
------------------------------

    Attachment: patch_8.18.zip

Hi Michael, thanks for your review comments. This patch includes

1)  XMLResolver and XMLReporter implementation 
2)  Code Improvement according to  your review comments.  

My response for your comments: 

Regarding StAXFilterParser:
- when a filtered XMLStreamReader is created it should be sitting on the first event which the StreamFilter accepts; in other words in the constructor you should be invoking the filter

[Wei : Add next() in the constructor]

- your implementations of next() and hasNext() recursively call themselves in an endless loop. think you probably meant super.next() and super.hasNext().

[Wei: Modified, use super.next() or super.hasnext() instead. ]

- hasNext() shouldn't advance the XMLStreamReader. It's just checking if there's more input; you probably don't need to override this method.

[Wei: Remove hasNext(). ]

- next() should pass the next event to the StreamFilter instead of the current one and stop at END_DOCUMENT instead of letting it run passed the end which would result in a XMLStreamException (if you try to advance the underlying XMLStreamReader any further)

[Wei: Yes, modify previous implementation.  ]

- think you also need to override nextTag() so that it also uses the StreamFilter

[Wei: Override nextTag() ]

Regarding close(), I see that the implementation is currently calling cleanup() on the XMLParserConfiguration.  I think what we really need here is to recycle the XMLParserConfiguration so that it can be reused by a new XMLStreamReader returned from the XMLInputFactory.  This would be pretty important for performance when reading small documents since creating an XMLParserConfiguration is rather expensive.

[Wei: Add two functions 1) public void InitStAXParser(XML11Configuration config) 2 )  public XML11Configuration GetXMLConfiguration(). So the other paser can share the configuration instance.]

This patch aslo include EntityResolve and Reporter implementation. Since my machine has some problem to patch newly added files. So I add the two new files into the zip. 

Thanks, Wei.  


> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.9.0
>            Reporter: Wei Duan
>            Assignee: Michael Glavassevich
>         Attachments: patch_7.8.txt, patch_8.18.zip
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Wei Duan (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wei Duan updated XERCESJ-1259:
------------------------------

    Component/s: StAX
    Description: 
The change adds more funtionalities to the StAX support, include

1. Add StreamFilter support. 
2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
3. Implment the close() method in XMLStreamReader implementation.

The plan for next two weeks will include,

1. Add support for properties such as XMLReporter, XMLResolver, etc. 
2. Upload the unit test cases to SVN server, currently on my local machine.
3. Refine current code according to feedback from Michael.  
        Summary: Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"  (was: Add Functionality to )

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>            Reporter: Wei Duan
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Wei Duan (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wei Duan updated XERCESJ-1259:
------------------------------

    Attachment: patch_7.8.txt

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>            Reporter: Wei Duan
>         Attachments: patch_7.8.txt
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521217 ] 

Michael Glavassevich commented on XERCESJ-1259:
-----------------------------------------------

Thanks Wei. I've committed your latest patch to SVN.

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.9.0
>            Reporter: Wei Duan
>            Assignee: Michael Glavassevich
>         Attachments: patch_7.8.txt, patch_8.18.zip
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESJ-1259) Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich updated XERCESJ-1259:
------------------------------------------

    Affects Version/s: 2.9.0

> Add SteamFilter Function to SoC2007 project "Add support for the StAX (JSR-173) cursor API to Xerces-J"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1259
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1259
>             Project: Xerces2-J
>          Issue Type: New Feature
>          Components: StAX
>    Affects Versions: 2.9.0
>            Reporter: Wei Duan
>         Attachments: patch_7.8.txt
>
>
> The change adds more funtionalities to the StAX support, include
> 1. Add StreamFilter support. 
> 2. Add full support for Entity Referrence, and add support for DTD and CDATA. 
> 3. Implment the close() method in XMLStreamReader implementation.
> The plan for next two weeks will include,
> 1. Add support for properties such as XMLReporter, XMLResolver, etc. 
> 2. Upload the unit test cases to SVN server, currently on my local machine.
> 3. Refine current code according to feedback from Michael.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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