Jody Garnett ha scritto: > Andrea Aime wrote: >> To tell the truth, the well known name is an xs:string, so we would >> not be allowed to use an expression there either, but at least >> the xml is using an element for that SLD part, so it's easy to extend >> it to use an expression, whilst the external graphics url is an >> attribute, that leaves no place for putting an expression... >> > The Java API is using an Expression there? Darn. Well Andrea we can also > honestly use ExternalGraphic > it has the ability to supply vendor specific parameters that are > expressions (and this is already used in our project).
Sorry, I don't see this possibility in the schema? > Is the core ExternalGraphic limited to a reference or can it be an > expression? The official definition of ExternalGraphic is the following: <xsd:element name="ExternalGraphic"> <xsd:annotation> <xsd:documentation> An "ExternalGraphic" gives a reference to an external raster or vector graphical object. </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element ref="sld:OnlineResource"/> <xsd:element ref="sld:Format"/> </xsd:sequence> </xsd:complexType> </xsd:element> and OnlineResource is: <xsd:element name="OnlineResource"> <xsd:annotation> <xsd:documentation> An OnlineResource is typically used to refer to an HTTP URL. </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attributeGroup ref="xlink:simpleLink"/> </xsd:complexType> </xsd:element> and finally xlink:simpleLink is: <attributeGroup name="simpleLink"> <attribute name="type" type="string" fixed="simple" form="qualified"/> <attribute ref="xlink:href" use="optional"/> <attribute ref="xlink:role" use="optional"/> <attribute ref="xlink:arcrole" use="optional"/> <attribute ref="xlink:title" use="optional"/> <attribute ref="xlink:show" use="optional"/> <attribute ref="xlink:actuate" use="optional"/> </attributeGroup> <attribute name="href" type="anyURI"/> so as you can see, it has to be a literal, there is no allowance for an expressions. As I stated before, the ExternalResource url is an attribute, so you cannot stick and Expression in there. > I feel like someone has come in here and hacked up this problem into > ExternalGraphics before us and I simply don't understand the > solution :-( Or they only made it half way... It just seems the usual "let make this more general" approach taken in the SLD objects and filters in GeoTools. All in all I still prefer using marks and WellKnownName, given a certain domain the mil stuff is well known and it's, afaik, pure lineart graphic that fits well the Mark definition. ExternalGraphic seems more geared towards internet accessible resources and you don't have control on color and painting attributes of what you're going to draw. That is, with ExternalGraphic you have to embed that information somehow in the url and have the pluggable system recognize them, with Mark the pluggable system would handle only the shape, and the standard sld would allow to specify line width, color, filling and whatnot. Cheers Andrea ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel