Hey Christopher,<div><br></div><div>Thanks! I was definitely misunderstanding namespaced XML at some point - I just needed to start using PHP&#39;s namespace-sensitive children() functions (there&#39;s one for SimpleXML and DOMDocument, just a warning to those who follow...), and that way you can grab the data in those. The XML seems pretty usable otherwise.</div>
<div><br></div><div>Thanks!</div><div><br></div><div>Tom<br><br><div class="gmail_quote">On Sat, Nov 1, 2008 at 11:12 AM, Christopher Schmidt <span dir="ltr">&lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">On Mon, Oct 27, 2008 at 10:18:46AM -0400, Tom MacWright wrote:<br>
&gt; Hey,<br>
&gt; First off - thanks a ton for your work on FeatureServer, it looks like a<br>
&gt; great lightweight option to &#39;fill in the gaps&#39; of an open-source mapping<br>
&gt; stack.<br>
&gt;<br>
&gt; I&#39;m working on writing a parser for WFS in PHP (generalized, but initially<br>
&gt; targeted to the Drupal CMS), and I&#39;ve come across an issue: SimpleXML, PHP&#39;s<br>
&gt; validating parser, rejects the GML output of FeatureServer, and for good<br>
&gt; reason: the WFS server included is hardcoded to point to <a href="http://example.com" target="_blank">example.com</a> [1],<br>
&gt; and there doesn&#39;t seem to be a schema definition file anywhere in the<br>
&gt; FeatureServer download.<br>
<br>
</div>Where the xmlns points to shouldn&#39;t play any role in the validation<br>
process, as far as I&#39;m aware. These are just unique identifiers -- so<br>
long as they are maintained through the schema definitions, they should<br>
be fine. However, the problem that you&#39;re likely having is that there<br>
*is* no schema for FeatureServer output: it&#39;s based on hacking things<br>
together, not based on following the wfs-basic schema.<br>
<br>
My first recommendation would be: tell your PHP parser to not validate<br>
your XML data. FeatureServer output is going to cause you more pain than<br>
its worth if you do this.<br>
<br>
My second recommendation is to learn enough about XML Schemas to write<br>
one that works for general FeatureServer output, though I have no idea<br>
if that&#39;s possible. (In the past, I&#39;ve had to write specific schemas for<br>
the database/columns being made available, which may well be true here.)<br>
<div class="Ih2E3d"><br>
<br>
<br>
&gt; I&#39;m wondering - is there a description available<br>
&gt; anywhere, or has anyone written one? It seems odd that <a href="http://example.com" target="_blank">example.com</a> is<br>
&gt; hardcoded into this, and I think it would be a simple-enough thing to patch<br>
&gt; (possibly adding another var to featureserver.cfg?), so if that&#39;s needed or<br>
&gt; wanted, I&#39;d love to pitch in.<br>
<br>
</div>I&#39;d recommend first changing the XML file manually to figure out what<br>
changes you need to make to get your PHP code to accept the file. I<br>
expect that if it&#39;s actually validating XSD, then you&#39;re going to be<br>
needing to do a fair amount more work (though it is possible that simply<br>
dropping the xsi:schemaLocation will cause PHP to stop moaning...)<br>
<br>
Regards,<br>
<font color="#888888">--<br>
Christopher Schmidt<br>
MetaCarta<br>
</font></blockquote></div><br></div>