Good debugging Vitali - so what do we do on our side?

Options:
- document the fix you mention 
(http://docs.codehaus.org/display/GEOTDOC/01+SAX+Parser)
- can we throw a more useful error message ourselves if a name space is 
not provided?

What do you suggest?
Jody
> So. The issue is solved by adding namespace URI for "xmlns:prefix"
> attributes in TransformerBase class:
>
> An example of creation the attribute with SLD namespace declaration that
> works against JDK 1.5.0_12 and later (hope so).
>
> ===============================================================
>                 atts.addAttribute("http://www.w3.org/2000/xmlns/";, null,
>                     "xmlns:sld", "CDATA","http://www.opengis.net/sld";);
> ===============================================================
>
> Also for other namespaces. In this case these attributes are not ignored by
> JDK internal XML serializers (org.apache.*). Seems the problem is that they
> do not like default namespace for xmlns-based attributes starting from  some
> of the latest versions of JDK 5.
>
> Vitali.
>
>
>   
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:geotools-devel-
>> [EMAIL PROTECTED] On Behalf Of Vitali Diatchkov
>> Sent: Tuesday, June 26, 2007 8:58 PM
>> To: 'geotools-devel'
>> Subject: [Geotools-devel] Attention! SLDTransformer and namespaces
>> inGeoTools 2.2.3
>>
>>
>> Hi!
>>
>> With installed Java 1.5.0_12  SLDTransformer stopped to output xmlns:*
>> attributes in first XML tag of SLD. After that SLD is not readable back to
>> the object tree because Java default SAX parser just throws
>> XMLParseException.
>>
>> Before it was Java 1.5.0_04. Debugging shows that internally in XML
>> serializer (in Java classpath) these attributes in first tag are ignored.
>> There are some comments and javadoc in source files sending to play with
>> http://xml.org/sax/features/namespace-prefixes
>> http://xml.org/sax/features/namespace
>>
>> options.
>>
>>
>> Suspect that old hack with startElement().. where xmlns attributes is not
>> enough with modern parsers?
>>
>> The test case is found with UDIG.
>>
>> Vitali.
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Geotools-devel mailing list
>> Geotools-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>     
>
>
> -------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to