Process notification of the beginning of the document being reached. @exception SAXException if a parsing error is to be reported
()
| 1271 | * @exception SAXException if a parsing error is to be reported |
| 1272 | */ |
| 1273 | @Override |
| 1274 | public void startDocument() throws SAXException { |
| 1275 | |
| 1276 | if (saxLog.isTraceEnabled()) { |
| 1277 | saxLog.trace("startDocument()"); |
| 1278 | } |
| 1279 | |
| 1280 | if (locator instanceof Locator2) { |
| 1281 | if (root instanceof DocumentProperties.Charset) { |
| 1282 | String enc = ((Locator2) locator).getEncoding(); |
| 1283 | if (enc != null) { |
| 1284 | try { |
| 1285 | ((DocumentProperties.Charset) root).setCharset(B2CConverter.getCharset(enc)); |
| 1286 | } catch (UnsupportedEncodingException e) { |
| 1287 | log.warn(sm.getString("digester.encodingInvalid", enc), e); |
| 1288 | } |
| 1289 | } |
| 1290 | } |
| 1291 | } |
| 1292 | |
| 1293 | // ensure that the digester is properly configured, as |
| 1294 | // the digester could be used as a SAX ContentHandler |
| 1295 | // rather than via the parse() methods. |
| 1296 | configure(); |
| 1297 | } |
| 1298 | |
| 1299 | |
| 1300 | /** |
nothing calls this directly
no test coverage detected