- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 12 Jul 2005 14:47:58 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/util/xml In directory hutz:/tmp/cvs-serv17634/css/util/xml Modified Files: XMLCatalog.java Log Message: Utf8 properties (Jean-Guilhem Rouel) Index: XMLCatalog.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/util/xml/XMLCatalog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XMLCatalog.java 12 Jan 2004 11:00:58 -0000 1.2 +++ XMLCatalog.java 12 Jul 2005 14:47:55 -0000 1.3 @@ -13,24 +13,20 @@ */ package org.w3c.css.util.xml; -import org.xml.sax.ContentHandler; +import java.net.URL; + +import org.w3c.css.util.Utf8Properties; import org.xml.sax.Attributes; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.Locator; +import org.xml.sax.ContentHandler; import org.xml.sax.InputSource; - -import java.io.InputStream; - -import java.util.Properties; - -import java.net.URL; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; /** * @version $Revision$ * @author Philippe Le Hegaret */ -public class XMLCatalog extends Properties implements ContentHandler { +public class XMLCatalog extends Utf8Properties implements ContentHandler { URL baseURI; @@ -44,22 +40,28 @@ } catch (Exception e) { System.err.println("org.w3c.css.css.XMLStyleSheetHandler: " + "couldn't load catalog.xml"); - System.err.println(" " + e.toString() ); + System.err.println(" " + e.toString()); } } - public void setDocumentLocator (Locator locator) {} - public void startDocument () - throws SAXException {} - public void endDocument() - throws SAXException {} - public void startPrefixMapping (String prefix, String uri) - throws SAXException {} - public void endPrefixMapping (String prefix) - throws SAXException {} - public void startElement (String namespaceURI, String localName, - String qName, Attributes atts) + public void setDocumentLocator(Locator locator) { + } + + public void startDocument() throws SAXException { + } + + public void endDocument() throws SAXException { + } + + public void startPrefixMapping(String prefix, String uri) throws SAXException { + } + + public void endPrefixMapping(String prefix) throws SAXException { + } + + public void startElement(String namespaceURI, String localName, + String qName, Attributes atts) throws SAXException { if ("system".equals(qName)) { String systemId = atts.getValue("systemId"); String uri = atts.getValue("uri"); @@ -82,25 +84,35 @@ } } } - public void endElement (String namespaceURI, String localName, - String qName) - throws SAXException {} - public void characters (char ch[], int start, int length) - throws SAXException {} - public void ignorableWhitespace (char ch[], int start, int length) - throws SAXException {} - public void processingInstruction (String target, String data) - throws SAXException {} - public void skippedEntity (String name) - throws SAXException {} + + public void endElement(String namespaceURI, String localName, String qName) + throws SAXException { + } + + public void characters(char ch[], int start, int length) + throws SAXException { + } + + public void ignorableWhitespace(char ch[], int start, int length) + throws SAXException { + } + + public void processingInstruction(String target, String data) + throws SAXException { + } + + public void skippedEntity(String name) throws SAXException { + } void parse(String urlString) throws Exception { org.xml.sax.XMLReader xmlParser = new org.apache.xerces.parsers.SAXParser(); try { - xmlParser.setFeature("http://xml.org/sax/features/namespace-prefixes", true); + xmlParser.setFeature( + "http://xml.org/sax/features/namespace-prefixes", true); - xmlParser.setFeature("http://xml.org/sax/features/validation", false); + xmlParser.setFeature("http://xml.org/sax/features/validation", + false); } catch (Exception ex) { ex.printStackTrace(); }
Received on Tuesday, 12 July 2005 14:48:04 UTC