<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello Cullen,</p>
<p>Thank you for using GeotoolKit (and for the metadata work on
SIS).</p>
<p>The current SLD/SE decoder (and API) do not provide the
namespace/prefix mapping sorry.</p>
<p>Rather then providing a Map (or similar) on the root style
objects I think i would be more appropriate to resolve the
prefixes in the PropertyName value when the xml is parsed. This
way the PropertyName would be self-sufficient.</p>
This operation would happen in the two classes :<br>
- org.geotoolkit.ogc.xml.OGC100toGTTransformer#visitPropertyName<br>
- org.geotoolkit.ogc.xml.OGC110toGTTransformer#visitPropertyName<br>
<br>
The problem is with JAXB, we need to find a way to grab the
namespace/prefix map for the object somehow, I haven't search for a
long time but if you found out how to do it that would make thinks
easier (Maybe there is something more to explore with
com.sun.xml.bind.marshaller.NamespacePrefixMapper).<br>
<br>
In the mean time you can use the expanded form for your xpath.<br>
example : /{<a class="moz-txt-link-freetext" href="http://test.com">http://test.com</a>}attCpx/{<a class="moz-txt-link-freetext" href="http://test.com">http://test.com</a>}attString<br>
<br>
<br>
Johann<br>
<p><br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 15/06/2017 23:38, Cullen Rombach
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+wz+XXxiCm7Wn+4CrCkoc7-e18OQNNd5We=g9i1YPszc6r6-A@mail.gmail.com">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>I am currently working with the Geotoolkit SLD API, and I
would like to know if it is possible to get the namespace
context of an SLD or SE document, specifically Expression and
Filter elements, either in a key-value map or otherwise.</div>
<div><br>
</div>
<div>In instances where there is a PropertyName present, there
is often an XPath with a namespace prefix. I would like to be
able to access the associated namespace declaration so that I
can resolve the XPath later on.</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Cullen Rombach</div>
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">Cullen Rombach
<div>Image Matters LLC</div>
<div><a href="http://www.imagemattersllc.com"
target="_blank" moz-do-not-send="true">www.imagemattersllc.com</a></div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Geotoolkit mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geotoolkit@lists.osgeo.org">Geotoolkit@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/geotoolkit">https://lists.osgeo.org/mailman/listinfo/geotoolkit</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<img src="cid:part2.AF9650BF.BEDAC1AA@geomatys.com" border="0"></div>
</body>
</html>