From: Giulio V. <gva...@us...> - 2004-07-26 10:48:05
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11920/src/org/exist Modified Files: Indexer.java Log Message: Preserve whitespace inside a mixed content node Index: Indexer.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/Indexer.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Indexer.java 23 Jun 2004 12:46:34 -0000 1.11 --- Indexer.java 26 Jul 2004 10:47:56 -0000 1.12 *************** *** 91,94 **** --- 91,95 ---- protected String ignorePrefix = null; protected ProgressIndicator progress; + protected boolean suppressWSmixed =false; // reusable fields *************** *** 136,139 **** --- 137,145 ---- normalize = 0; } + + Boolean temp; + if ((temp = (Boolean) config.getProperty("indexer.suppress-whitespace-mixed-content")) + != null) + suppressWSmixed = temp.booleanValue(); } *************** *** 419,430 **** if (charBuf != null) { if(charBuf.isWhitespaceOnly()) { ! // if(charBuf.length() > 0 && last.getChildCount() > 0) { ! // text.setData(charBuf); ! // text.setOwnerDocument(document); ! // last.appendChildInternal(text); ! // if (!validate) ! // broker.store(text, currentPath); ! // text.clear(); ! // } } else if(charBuf.length() > 0) { // mixed element content: don't normalize the text node, just check --- 425,439 ---- if (charBuf != null) { if(charBuf.isWhitespaceOnly()) { ! if (suppressWSmixed) { ! if(charBuf.length() > 0 && last.getChildCount() > 0) { ! text.setData(charBuf); ! text.setOwnerDocument(document); ! last.appendChildInternal(text); ! if (!validate) ! broker.store(text, currentPath); ! text.clear(); ! } ! } ! } else if(charBuf.length() > 0) { // mixed element content: don't normalize the text node, just check |