Hey Christopher,<div><br></div><div>Thanks! I was definitely misunderstanding namespaced XML at some point - I just needed to start using PHP's namespace-sensitive children() functions (there'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"><<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>></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>
> Hey,<br>
> First off - thanks a ton for your work on FeatureServer, it looks like a<br>
> great lightweight option to 'fill in the gaps' of an open-source mapping<br>
> stack.<br>
><br>
> I'm working on writing a parser for WFS in PHP (generalized, but initially<br>
> targeted to the Drupal CMS), and I've come across an issue: SimpleXML, PHP's<br>
> validating parser, rejects the GML output of FeatureServer, and for good<br>
> reason: the WFS server included is hardcoded to point to <a href="http://example.com" target="_blank">example.com</a> [1],<br>
> and there doesn't seem to be a schema definition file anywhere in the<br>
> FeatureServer download.<br>
<br>
</div>Where the xmlns points to shouldn't play any role in the validation<br>
process, as far as I'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're likely having is that there<br>
*is* no schema for FeatureServer output: it'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's possible. (In the past, I'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>
> I'm wondering - is there a description available<br>
> anywhere, or has anyone written one? It seems odd that <a href="http://example.com" target="_blank">example.com</a> is<br>
> hardcoded into this, and I think it would be a simple-enough thing to patch<br>
> (possibly adding another var to featureserver.cfg?), so if that's needed or<br>
> wanted, I'd love to pitch in.<br>
<br>
</div>I'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's actually validating XSD, then you'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>