cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Sending a parameter to Xerces (allow java char encodings)
Date Sun, 11 Aug 2002 18:52:00 GMT
> From: Jesse Reynolds [mailto:lizst@va.com.au]
> 
> Hi Vadim et al
> 
> Okay, I've now edited JaxpParser.java, the diff's between the 2.0.2
> version (same as the 2.0.3 version) and my modification is below.
> 
> But it doesn't work. What have I missed? Do I need to fix something
> in cocoon.xconf? I've modified it in the 2.0.2 source. ... How can I
> build a test to see if the xml parser is in fact getting the
> allow-java-encodings feature turned on? Some XSP perhaps? (I am
> really only assuming that Blackdown 1.2.2 JDK does support MacRoman,
> because the Sun JDK 1.2.2 does and we do have a
> $JAVA_HOME/jre/lib/i18n.jar file present, but this is an assumption
> that I need to question... but my feeling is that the code i've
> written into cocoon is probably just plain wrong...)

As google points out, allow-java-encodings should be written as
'http://apache.org/xml/features/allow-java-encodings' (96 hits), but not
as 'http://xml.org/sax/features/allow-java-encodings' (3 hits).

Seems that there is an error on
"http://xml.apache.org/xerces2-j/features.html"
page. It has "xml.org" in the example, but if you scroll down, it talks
about "http://apache.org/xml/features/allow-java-encodings".


Vadim


> Thankyou
> 
> Jesse
> 
> bash-2.04# diff
> ./src/java/org/apache/cocoon/components/parser/JaxpParser.java.orig
> ./src/java/org/apache/cocoon/components/parser/JaxpParser.java
> 138a139,141
> >      /** do we want to allow all possible text encodings recognised
> >by current JVM? */
> >      protected boolean allowJavaEncodings;
> >
> 205a209,214
> >
> >          // Pick up "allow-java-encodings" to allow the use of
additional
> >          //   character encodings supported by current JVM (eg
"MacRoman")
> >          // Jesse Reynolds 2002.08.10
> >          this.allowJavaEncodings =
> >params.getParameterAsBoolean("allow-java-encodings", true);
> >
> 215a225,233
> >          }
> >
> >          if (this.allowJavaEncodings) {
> >              try {
> >
>
>this.reader.setFeature("http://xml.org/sax/features/allow-java-encoding
s",
> >true);
> >              } catch (SAXException e) {
> >                  getLogger().warn("SAX2 driver does not support
> >feature: 'allow-java-encodings' "+
> >
> >"('http://xml.org/sax/features/allow-java-encodings')");
> >              }

...


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message