users@fi.java.net

AW: AW: Problem with FastInfosetSource and Namespaces

From: <Horst.Gaussmann_at_partner.commerzbank.com>
Date: Thu, 6 Apr 2006 18:02:33 +0200

ups my fault ...

-----Ursprüngliche Nachricht-----
Von: Paul Sandoz [mailto:Paul.Sandoz_at_Sun.COM]
Gesendet: Donnerstag, 6. April 2006 19:01
An: users_at_fi.dev.java.net; Horst.Gaussmann_at_partner.commerzbank.com
Betreff: Re: AW: Problem with FastInfosetSource and Namespaces

Gaussmann, Horst wrote:
> I've got the latest version of this class but if the setFeature
> methode with Features.NAMESPACES_FEATURE and true is called it goes to
> the latest else and throws an exception.
>

The latest code is as follows:

     public void setFeature(String name, boolean value)
     throws SAXNotRecognizedException, SAXNotSupportedException {
         if (name.equals(Features.NAMESPACES_FEATURE)) {
             if (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);
         }

So i am not sure how you are getting an exception when the value is true.


This kindly reminded me that i need to up the stable version to 1.0.2, i
will do this immediately.

Paul.

> greetings horst
>
> -----Ursprüngliche Nachricht-----
> Von: Alan Hudson [mailto:giles_at_yumetech.com]
> Gesendet: Donnerstag, 6. April 2006 17:34
> An: users_at_fi.dev.java.net
> Betreff: Re: Problem with FastInfosetSource and Namespaces
>
> 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.featureNotSuppor
>>ted")
>>+ 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.featureNotSuppor
> ted")
> + name);
> }
> }
>
> --
> Alan Hudson
>
> President Yumetech, Inc. www.yumetech.com
> President Web3D Consortium www.web3d.org
> 206 340 8900
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_fi.dev.java.net For
> additional commands, e-mail: users-help_at_fi.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_fi.dev.java.net For
> additional commands, e-mail: users-help_at_fi.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_fi.dev.java.net For additional
commands, e-mail: users-help_at_fi.dev.java.net