db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject cvs commit: db-torque/xdocs changes.xml
Date Sun, 26 Jun 2005 06:49:59 GMT
tfischer    2005/06/25 23:49:59

  Modified:    src/generator/src/java/org/apache/torque/engine/database/transform
                        XmlToAppData.java
               xdocs    changes.xml
  Log:
  The generator now validates the schema.xml against its DTD and throws an error if the shema.xml
does not satisfy the DTD
  
  Revision  Changes    Path
  1.15      +22 -1     db-torque/src/generator/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java
  
  Index: XmlToAppData.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/database/transform/XmlToAppData.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XmlToAppData.java	22 Feb 2004 06:27:19 -0000	1.14
  +++ XmlToAppData.java	26 Jun 2005 06:49:59 -0000	1.15
  @@ -39,6 +39,7 @@
   import org.xml.sax.Attributes;
   import org.xml.sax.InputSource;
   import org.xml.sax.SAXException;
  +import org.xml.sax.SAXParseException;
   import org.xml.sax.helpers.DefaultHandler;
   
   /**
  @@ -49,6 +50,7 @@
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
    * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
  + * @author <a href="mailto:fischer@seitenbau.de">Thomas Fischer</a>
    * @version $Id$
    */
   public class XmlToAppData extends DefaultHandler
  @@ -326,6 +328,25 @@
                       + rawName + ") called");
           }
       }
  +    
  +    /**
  +     * Handles exception which occur when the xml file is parsed
  +     * @param e the exception which occured while parsing
  +     * @throws SAXException always
  +     */
  +    public void error(SAXParseException e) throws SAXException
  +    {
  +        log.error("Sax parser threw an Exception", e);
  +        throw new SAXException(
  +                "Error while parsing " 
  +                + currentXmlFile 
  +                + " at line "
  +                + e.getLineNumber()
  +                + " column "
  +                + e.getColumnNumber()
  +                + " : "
  +                + e.getMessage());
  +    }
   
       /**
        * When parsing multiple files that use nested <external-schema> tags we
  
  
  
  1.165     +4 -0      db-torque/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
  retrieving revision 1.164
  retrieving revision 1.165
  diff -u -r1.164 -r1.165
  --- changes.xml	14 Jun 2005 20:51:13 -0000	1.164
  +++ changes.xml	26 Jun 2005 06:49:59 -0000	1.165
  @@ -28,6 +28,10 @@
     <body>
   
     <release version="3.2-dev" date="in CVS">
  +    <action type="add" dev="tfischer">
  +      The database schema.xml is now validated against the DTD. The generator stops
  +      and displays an error message if the schema.xml does not satisfy the DTD.  
  +    </action>
       <action type="fix" dev="tfischer" issue="TRQS286">
         The TorqueJDBCTransformTask now creates a name attribute for the database
         element. The attribute value is the name of the database user used to 
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message