users@fi.java.net

Re: Problem with FastInfosetSource and Namespaces

From: Alan Hudson <giles_at_yumetech.com>
Date: Thu, 06 Apr 2006 08:34:28 -0700

Gaussmann, Horst wrote:
> Hello,
>
> i try to transform a FastInfoset document using Saxon as the Transformer. So
> my problem is that saxon tries to set the Namespaces feature but the
> SAXDocumentParser
> used from FastInfosetSource claims to handle this feature see getFeature but
> if saxon tries to set it an Exception is thrown. So what's up support or not
> support of the feature ?
>
> public boolean getFeature(String name)
> throws SAXNotRecognizedException, SAXNotSupportedException {
> if (name.equals(Features.NAMESPACES_FEATURE)) {
> return true; ...
>
> public void setFeature(String name, boolean value)
> throws SAXNotRecognizedException, SAXNotSupportedException {
> if (name.equals(Features.NAMESPACES_FEATURE)
> && value == false) {
> throw new SAXNotSupportedException(name + ":" + value);
> } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
> _namespacePrefixesFeature = value;
> } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
> name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
> setStringInterning(value);
> } else {
> throw new SAXNotRecognizedException(
>
> CommonResourceBundle.getInstance().getString("message.featureNotSupported")
> + name);
> }
>
That was fixed a month or two ago. Check the latest source. The new
latest version of SAXDocumentParser is 1.41

it now says:
     public boolean getFeature(String name)
     throws SAXNotRecognizedException, SAXNotSupportedException {
         if (name.equals(Features.NAMESPACES_FEATURE)) {
             return true;
         } else if (name.equals(Features.NAMESPACE_PREFIXES_FEATURE)) {
             return _namespacePrefixesFeature;
         } else if (name.equals(Features.STRING_INTERNING_FEATURE) ||
                 name.equals(FastInfosetReader.STRING_INTERNING_PROPERTY)) {
             return getStringInterning();
         } else {
             throw new SAXNotRecognizedException(
 
CommonResourceBundle.getInstance().getString("message.featureNotSupported")
+ name);
         }
     }

-- 
Alan Hudson
President Yumetech, Inc.                               www.yumetech.com
President Web3D Consortium                             www.web3d.org
206 340 8900