I get the subject error when I turn on validation with a SAXParser.
I did not get a response from anybody official, however, one other user
complained of
not finding the message_fr module. I am resubmitting these questions. Would
someone please respond?

> Questions:
> 1. How do I use cygwin to make the xerces tree without the 87 errors I am
getting?
> 2. Is my problem due to not installing with the makefile?
> 3. Am I missing some declaration in my *.xml or *.dtd file?
> 4. If I really need "message_en_US", why is it not in the distribution?
> Where can I get it?
> 5. Can the Java SAXParser validate an XML document based on DTD? If not
> when will that be supported?
> 6. If so, it appears that all I have to do is implement the DeclHandler
> Interface in my XXTemplate  class , correct?
> 

> I get the subject error when I turn on validation with a SAXParser. I have
> looked in the zip file and the resulting 
> directory structure for the missing file. It is not there. I downloaded
> Xerces-J-src.1.4.0.zip and Xerces-J-tools.1.4.0.zip.
> I unzipped the two zip files. I followed the instructions for building
> docs and src on a Windows platform, including downloading and installing
> cygwin. I doubleClicked the cygwin icon, which briefly opened a cmd window
> then closed it. No visible changes were seen.
>   I logged into cygwin, and at the top of the tree, I typed "make docs
apidocs and
> got 87 errors" . Then I typed 
> "make jars " and got 87 errors. I checked my environment variable
> "CLASSPATH". "Environment variable CLASSPATH not defined".
> I am using Borland JBuilder3, so I moved the directory structure to reside
> under my ..\Java\Source directory which is my Source root in JBuilder3.
> Below, I have attached the parsed file (well formed and valid iaw XMLSpy
> before I changed names) and the dtd file on which it is based. I changed
> some names to protect company information. (eg Help is not the right file
> name and JunkSrvr is not the server name.):
>  <<Help052301.xml>>  <<Help.dtd>> 
> ============================================= 
> The stack dump follows:
> org.apache.xerces.validators.datatype.InvalidDatatypeFacetException:
> Installation Problem???  
> Couldn't load messages: can't find resource for
> org.apache.xerces.utils.regex.message_en_US   at
> org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.
> createDatatypeValidator(DatatypeValidatorFactoryImpl.java:449)
>         at
> org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.
>       
> createDatatypeValidator(DatatypeValidatorFactoryImpl.java:403)
>         at
> org.apache.xerces.validators.datatype.DatatypeValidatorFactoryImpl.
>               initializeDTDRegistry(DatatypeValidatorFactoryImpl.java:146)
>         at
> org.apache.xerces.validators.common.XMLValidator.initDataTypeValidators(XM
> LValidator.java:1949)
>         at
> org.apache.xerces.validators.common.XMLValidator.setValidationEnabled(XMLV
> alidator.java:511)
>         at
> org.apache.xerces.framework.XMLParser.setValidation(XMLParser.java:393)
>         at
> org.apache.xerces.framework.XMLParser.setFeature(XMLParser.java:1144)
>         at
> org.apache.xerces.parsers.SAXParser.setFeature(SAXParser.java:578)
> 
> which is called from my code.
>       m_saxParser.setFeature( "http://xml.org/sax/features/validation";,
> true);
> ===================================================================
> more of my code:
> public class XXTemplate  extends DefaultHandler implements DeclHandler
> {
> ...
>   private SAXParser   m_saxParser          = new SAXParser();
>   public XXTemplate()
>   {
> 
>   }
>   public XXTemplate(String apiName, String apiVersion)
>   {
>     m_sApiName     = apiName;
>     m_sApiVersion  = apiVersion;
>     DTDReader   handler = new DTDReader();
>   try
>     {
>       String fileName = (new File(m_sInputFilePath + m_sApiName
> )).toString();
>       // when parsing is complete the root object, w/hierarchy will be in
> place.
>       FileReader fr  =  new FileReader(fileName);
>       m_saxParser.setContentHandler(this);
>       m_saxParser.setErrorHandler(this);
>       try
>       {
>       m_saxParser.setFeature( "http://xml.org/sax/features/validation";,
> true);
>       m_saxParser.setProperty(
> "http://xml.org/sax/properties/declaration-handler";, handler );
> 
>       }
>       catch(SAXNotSupportedException snse)
>       {
>          snse.printStackTrace();
>          out.println(snse.getMessage()  );
>       }
>       catch(SAXNotRecognizedException snre)
>       {
>          snre.printStackTrace();
>          out.println(snre.getMessage());
>       }
>       long start = System.currentTimeMillis();
>       m_saxParser.parse(new InputSource(fr));
>       long end =System.currentTimeMillis();
>       long millis = (end - start);
>       out.println("milliSeconds to parse: " + millis);
>     }
>     catch(FileNotFoundException fe)
>     {
>      fe.printStackTrace();
>      out.println(fe.getMessage());
>     }
>     catch(SAXException se)
>     {
>       se.printStackTrace();
>       out.println(se.getMessage());
>     }
>      catch(IOException ioe)
>     {
>       ioe.printStackTrace();
>       out.println(ioe.getMessage());
>     }
>   }
> ...
> }

Attachment: FtlAPI.dtd
Description: Binary data

Attachment: Help052301.xml
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to