On 26/10/2011 9:17, Andrea Aime wrote:
On Tue, Oct 25, 2011 at 4:45 PM, Jan De Moerloose <[email protected] <mailto:[email protected]>> wrote:

    Problem is that i don't even reach this factory because my
    relative path cannot be turned into a valid url (no protocol) by
    the SLDParser.


Wait, did you just say relative path?
The SLDParser already resolved external graphic paths relative to the sld file itself using the sourceUrl
field:

public void setInput(java.net.URL url) throws java.io.IOException {
        source = new InputSource(url.openStream());
        sourceUrl = url;
    }

Ok, I guess I understand where you're going now.
Glad for that, i'm not always as clear as i'd like to be.
I guess we could either expose a setter for that field or as you suggested allow for a OnlineResourceLocator to be set into the parser like you suggested, I'd be fine with both.
Just setting the sourceUrl does not cover such cases as the SLD/images coming from a database (as seen from the server), so i would prefer to have full flexibility on resolving that URL.

I'm wondering about the SLD 1.1 parser though, not sure if it's supporting such
relative location mechanism. Justin?
If that's the GTXMLparser, i think i tried that with some success. Unfortunately it behaves a bit different in terms of defaults, so i stopped using it. Are any other projects using it ?

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------


--
Sincerely,
Jan De Moerloose

Geosparc n.v.
http://www.geosparc.com
sponsor of http://www.geomajas.org

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to