[ 
http://issues.apache.org/jira/browse/SOLR-78?page=comments#action_12456987 ] 
            
Hoss Man commented on SOLR-78:
------------------------------

FWIW: I don't know a lot about DOM2 vs DOM3, but loking over the documentation 
on the meaning of textContent I see...

      http://www.w3.org/TR/DOM-Level-3-Core/core.html
      ...
      [forsome node types]
      concatenation of the textContent attribute value of every child node, 
excluding COMMENT_NODE and 
      PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node 
has no children.
      [for other node types including comments and processing instructions]
      nodeValue

If I'm reading that right, then if we replace usages of getTextContent with our 
own method for walking the child nodes and pulling out the nodeValue, we need 
to explicitly watch out for processing instructions and comments or we will 
start slurping them in my accident right?

either way: DOMUtil.getText(Node) should have some javadoc clarifying it's 
purpsoe (support DOM 2) so it doesn't accidently get optimized away by someone 
down the road who says "hey, we can just use getTextContent()!"

> [PATCH] Improved config loading
> -------------------------------
>
>                 Key: SOLR-78
>                 URL: http://issues.apache.org/jira/browse/SOLR-78
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Alexander Saar
>            Priority: Minor
>         Attachments: fixed-config-loading-with-older-parser-versions.patch
>
>
> Solr configuration throws an UnsupportedConfigurationException for 
> Node.getTextContent() if it is started in server environments that uses older 
> implementations of the DOM API. This can be improved by checking wich node 
> type is actually handled an calling the appropriate methods.
> A patch that fixes this problem is attached.

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

        

Reply via email to