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 "Jacob Kjome (JIRA)" <xe...@xml.apache.org> on 2006/02/08 06:18:57 UTC

[jira] Created: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Need increase in visibility for HTMLElementImpl constructor
-----------------------------------------------------------

         Key: XERCESJ-1133
         URL: http://issues.apache.org/jira/browse/XERCESJ-1133
     Project: Xerces2-J
        Type: Improvement
  Components: DOM (HTML)  
    Versions: 2.7.1    
    Reporter: Jacob Kjome
 Attachments: xerces_xmlc-compat.patch


I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...

1.  HTMLElementImpl.java - make the constructor public instead of package private

2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).

Patch coming up.  I hope these can be in Xerces-2.8.0.

Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Jacob Kjome (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=comments#action_12367468 ] 

Jacob Kjome commented on XERCESJ-1133:
--------------------------------------

Everything looks good.  Thanks for taking the time to commit this!  I really appreciate it :-)

Jake

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>     Assignee: Michael Glavassevich
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=all ]
     
Michael Glavassevich resolved XERCESJ-1133:
-------------------------------------------

    Resolution: Fixed

I just wanted to make sure that you understood the risk. I've made the changes in SVN. Please verify.

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>     Assignee: Michael Glavassevich
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=all ]

Michael Glavassevich updated XERCESJ-1133:
------------------------------------------

    Fix Version: 2.8.0
    Description: 
I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...

1.  HTMLElementImpl.java - make the constructor public instead of package private

2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).

Patch coming up.  I hope these can be in Xerces-2.8.0.

Jake

  was:

I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...

1.  HTMLElementImpl.java - make the constructor public instead of package private

2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).

Patch coming up.  I hope these can be in Xerces-2.8.0.

Jake


> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>     Assignee: Michael Glavassevich
>      Fix For: 2.8.0
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Jacob Kjome (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=comments#action_12367003 ] 

Jacob Kjome commented on XERCESJ-1133:
--------------------------------------

Hi Michael,

Of course you are right on the AbstractDOMParser.  I guess I missed that there was a standard property available.  I guess I should have known since my "fix" was to call setProperty() in AbstractDOMParser.  Silly me on that one.  Please ignore that patch.

As far as the other patches go.  Yes, I realize the risk in referencing Xerces internals.  XMLC has taken that risk for years and it would take a lot more work than simply porting from using Xerces1 to Xerces2 to fix that.  But since the classes are there now and XMLC uses them, it would make life much easier not to have to track these changes to Xerces for XMLC's own purposes.  I'd like to be able to use Xerces-2.8.0 out-of-the-box.  And since it does no real harm to Xerces to make the change, it's a win-win... or, at the very least, a win-no-lose situation.

Based on your comment, it seems you are willing to make the changes as long as I understand the risk, and I definitely do.  Thanks for reviewing, and I hope the changes to HTMLElementImpl.java and DocumentTypeImpl.java can be committed soon so they get into Xerces-2.8.0 :-)

later,

Jake

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Assigned: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=all ]

Michael Glavassevich reassigned XERCESJ-1133:
---------------------------------------------

    Assign To: Michael Glavassevich

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>     Assignee: Michael Glavassevich
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Jacob Kjome (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=all ]

Jacob Kjome updated XERCESJ-1133:
---------------------------------

    Attachment: xerces_xmlc-compat2.patch

New patch.  Same as old patch except added fix for setting the AbstractDOMParser documentClassName property so it actually gets used.  Without this addition, calling setDocumentClassName(String) does not use the passed-in documentClassName.  Instead, it just uses its default every time.  XMLC's MetaDataDocument extends DocumentImpl and uses a parser which extends DOMParser so that it can set the documentClassName.  Before this change, Xerces improperly created an instance of the superclass DocumentImpl, even though called setDocumentClassName(MetaDataDocument.class.getName()).  After this change, Xerces properly creates an instance of subclass MetaDataDocument.  This and the other two patches are must-haves for XMLC compatibility with Xerces.  The first two changes are so minor, they hardly need reviewing.  The AbstractDOMParser change will need reviewing, but it is such a simple addition that it shouldn't take long to do so.

Oh, one other difference between this patch and the old patch is that the paths to the files are relative to the top directory; eg. "src/org/apache/.....".  Before, they were relative to the "xerces" package, but without the "src/org/apache/".  that was due to a bug in TortoiseSVN.  They changed this in a new version, but now it creates the path relative to the system root.  I modified it to be more useful and less platform specific.  I hope it makes it easier to use.

Jake

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=comments#action_12367002 ] 

Michael Glavassevich commented on XERCESJ-1133:
-----------------------------------------------

Jake, I cannot apply the patch you made to AbstractDOMParser because it causes a performance regression. That one line change causes every component in the pipeline to read features and properties from the configuration when they otherwise wouldn't need to. setDocumentClassName(String) is an internal method which is called during parser reset.  The correct way to set the document class name is to call setProperty() [1] or better yet use JAXP instead by setting the property on the DocumentBuilderFactory using setAttribute().

I guess you know that the other changes you're asking for aren't in the public part of the API. You're taking a risk by extending or referencing Xerces' internals. Any class or interface marked with @xerces.internal could go away or have methods on them change in the future. You are prepared for that, right?

[1] http://xerces.apache.org/xerces2-j/properties.html#dom.document-class-name

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>  Attachments: xerces_xmlc-compat.patch, xerces_xmlc-compat2.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (XERCESJ-1133) Need increase in visibility for HTMLElementImpl constructor

Posted by "Jacob Kjome (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1133?page=all ]

Jacob Kjome updated XERCESJ-1133:
---------------------------------

    Attachment: xerces_xmlc-compat.patch

Patch to make Xerces DOM extendable by XMLC

> Need increase in visibility for HTMLElementImpl constructor
> -----------------------------------------------------------
>
>          Key: XERCESJ-1133
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1133
>      Project: Xerces2-J
>         Type: Improvement
>   Components: DOM (HTML)
>     Versions: 2.7.1
>     Reporter: Jacob Kjome
>  Attachments: xerces_xmlc-compat.patch
>
> I am making an attempt to move XMLC ( http://xmlc.enhydra.org/ ) from Xerces1 to Xerces2.  I'm currently unable to do that without manipulating the Xerces2 source for a couple of classes because of lack of visibility for a couple of methods.  I don't see any harm that would come from increasing visibility in either case.  The cases are...
> 1.  HTMLElementImpl.java - make the constructor public instead of package private
> 2.  DocumentTypeImpl.java - make setOwnerDocument(CoreDocumentImpl) protected instead of package private (needed for XMLC LazyDOM extension).
> Patch coming up.  I hope these can be in Xerces-2.8.0.
> Jake

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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