You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2004/05/05 00:26:19 UTC

DO NOT REPLY [Bug 27238] - Add parser (and other) configuration options to sample programs

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27238>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27238

Add parser (and other) configuration options to sample programs

zongaro@ca.ibm.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|Normal                      |Enhancement
         OS/Version|Other                       |All
           Platform|Other                       |All
            Summary|Attributes with default     |Add parser (and other)
                   |values do not show up in    |configuration options to
                   |XPath result                |sample programs



------- Additional Comments From zongaro@ca.ibm.com  2004-05-04 22:26 -------
Sorry for the long delay in responding to your bug report.  Yes, you are right 
that the schema processing isn't happening at all with the ApplyXPath sample.  
It's a matter of configuring the XML parser that is being used to parse the 
input document.

If you take a look at the source code for the sample, you can modify it so that 
input document is assessed against any schema that it refers to in 
schemaLocation attributes as follows:

      DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
      dfactory.setNamespaceAware(true);
      // Enable validation and schema assessment
      dfactory.setValidating(true);
      dfactory.setAttribute(
          "http://java.sun.com/xml/jaxp/properties/schemaLanguage",
          "http://www.w3.org/2001/XMLSchema");
      Document doc = dfactory.newDocumentBuilder().parse(in);


I think it would be a good idea if the Xalan team took a look at all of the 
sample programs, in order to decide whether there are interesting parser (or 
other) configuration options that should be added.  If you don't mind, I'm 
going to change the summary and make this an enhancement request.

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