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 "Johannes Koch (JIRA)" <xe...@xml.apache.org> on 2009/07/16 15:10:14 UTC

[jira] Created: (XERCESJ-1384) DOMException thrown in HTMLDocumentImpl.getDocumentElement()

DOMException thrown in HTMLDocumentImpl.getDocumentElement()
------------------------------------------------------------

                 Key: XERCESJ-1384
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1384
             Project: Xerces2-J
          Issue Type: Bug
          Components: DOM (HTML)
    Affects Versions: 2.9.1
            Reporter: Johannes Koch


After parsing an XHTML document with the NekoHTML parser (nekohtml-1.9.12) in namespaceAware mode, a call to HTMLDocumentImpl.getDocumentElement() results in a DOMException

When the while loop is finished, Node html is still null, because none of the document's child nodes are an instance of HTMLHtmlElement. Then all the document's child nodes are appended to the newly created HTMLHtmlElementImpl. A DocumentType node cannot be appended to an Element. See method testParseXhtmlDoc1() in appended test case DOMParserTest.

-- 
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-1384) DOMException thrown in HTMLDocumentImpl.getDocumentElement()

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

Johannes Koch updated XERCESJ-1384:
-----------------------------------

    Attachment: X_HTMLDocumentImplTest.java
                X_HTMLDOMImplementationImpl.java
                X_HTMLDocumentImpl.java

There were errors in some file in the attached jar.

> DOMException thrown in HTMLDocumentImpl.getDocumentElement()
> ------------------------------------------------------------
>
>                 Key: XERCESJ-1384
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1384
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (HTML)
>    Affects Versions: 2.9.1
>            Reporter: Johannes Koch
>         Attachments: DOMParserTest.java, x_html-dom.jar, X_HTMLDocumentImpl.java, X_HTMLDocumentImplTest.java, X_HTMLDOMImplementationImpl.java, X_HTMLDOMImplementationImplTest.java
>
>
> After parsing an XHTML document with the NekoHTML parser (nekohtml-1.9.12) in namespaceAware mode, a call to HTMLDocumentImpl.getDocumentElement() results in a DOMException
> When the while loop is finished, Node html is still null, because none of the document's child nodes are an instance of HTMLHtmlElement. Then all the document's child nodes are appended to the newly created HTMLHtmlElementImpl. A DocumentType node cannot be appended to an Element. See method testParseXhtmlDoc1() in appended test case DOMParserTest.

-- 
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-1384) DOMException thrown in HTMLDocumentImpl.getDocumentElement()

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

Johannes Koch updated XERCESJ-1384:
-----------------------------------

    Attachment: DOMParserTest.java

only the first test method (testParseXhtmlDoc1()) fails

> DOMException thrown in HTMLDocumentImpl.getDocumentElement()
> ------------------------------------------------------------
>
>                 Key: XERCESJ-1384
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1384
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (HTML)
>    Affects Versions: 2.9.1
>            Reporter: Johannes Koch
>         Attachments: DOMParserTest.java
>
>
> After parsing an XHTML document with the NekoHTML parser (nekohtml-1.9.12) in namespaceAware mode, a call to HTMLDocumentImpl.getDocumentElement() results in a DOMException
> When the while loop is finished, Node html is still null, because none of the document's child nodes are an instance of HTMLHtmlElement. Then all the document's child nodes are appended to the newly created HTMLHtmlElementImpl. A DocumentType node cannot be appended to an Element. See method testParseXhtmlDoc1() in appended test case DOMParserTest.

-- 
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-1384) DOMException thrown in HTMLDocumentImpl.getDocumentElement()

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

Johannes Koch updated XERCESJ-1384:
-----------------------------------

    Attachment: X_HTMLDOMImplementationImplTest.java

There were errors in some files in the attached jar.

> DOMException thrown in HTMLDocumentImpl.getDocumentElement()
> ------------------------------------------------------------
>
>                 Key: XERCESJ-1384
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1384
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (HTML)
>    Affects Versions: 2.9.1
>            Reporter: Johannes Koch
>         Attachments: DOMParserTest.java, x_html-dom.jar, X_HTMLDocumentImpl.java, X_HTMLDocumentImplTest.java, X_HTMLDOMImplementationImpl.java, X_HTMLDOMImplementationImplTest.java
>
>
> After parsing an XHTML document with the NekoHTML parser (nekohtml-1.9.12) in namespaceAware mode, a call to HTMLDocumentImpl.getDocumentElement() results in a DOMException
> When the while loop is finished, Node html is still null, because none of the document's child nodes are an instance of HTMLHtmlElement. Then all the document's child nodes are appended to the newly created HTMLHtmlElementImpl. A DocumentType node cannot be appended to an Element. See method testParseXhtmlDoc1() in appended test case DOMParserTest.

-- 
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-1384) DOMException thrown in HTMLDocumentImpl.getDocumentElement()

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

Johannes Koch updated XERCESJ-1384:
-----------------------------------

    Attachment: x_html-dom.jar

I created an HTMLDocument implementation for both HTML and XHTML (X_HTMLDocumentImpl extending HTMLDocumentImpl), a DOMImplementation and HTML element implementations extending ElementNSImpl copying functionality from the HTML element implementations. For me this helps to solve the issue. Additionally there are two JUnit test classes (X_HTMLDocumentImplTest and X_HTMLDOMImplementationImplTest).

> DOMException thrown in HTMLDocumentImpl.getDocumentElement()
> ------------------------------------------------------------
>
>                 Key: XERCESJ-1384
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1384
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (HTML)
>    Affects Versions: 2.9.1
>            Reporter: Johannes Koch
>         Attachments: DOMParserTest.java, x_html-dom.jar
>
>
> After parsing an XHTML document with the NekoHTML parser (nekohtml-1.9.12) in namespaceAware mode, a call to HTMLDocumentImpl.getDocumentElement() results in a DOMException
> When the while loop is finished, Node html is still null, because none of the document's child nodes are an instance of HTMLHtmlElement. Then all the document's child nodes are appended to the newly created HTMLHtmlElementImpl. A DocumentType node cannot be appended to an Element. See method testParseXhtmlDoc1() in appended test case DOMParserTest.

-- 
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