[Featureserver] fs namespace undefined for GML?

Tom MacWright macwright at gmail.com
Mon Nov 3 13:34:00 EST 2008


Hey Christopher,
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.

Thanks!

Tom

On Sat, Nov 1, 2008 at 11:12 AM, Christopher Schmidt <
crschmidt at metacarta.com> wrote:

> On Mon, Oct 27, 2008 at 10:18:46AM -0400, Tom MacWright wrote:
> > Hey,
> > First off - thanks a ton for your work on FeatureServer, it looks like a
> > great lightweight option to 'fill in the gaps' of an open-source mapping
> > stack.
> >
> > I'm working on writing a parser for WFS in PHP (generalized, but
> initially
> > targeted to the Drupal CMS), and I've come across an issue: SimpleXML,
> PHP's
> > validating parser, rejects the GML output of FeatureServer, and for good
> > reason: the WFS server included is hardcoded to point to example.com[1],
> > and there doesn't seem to be a schema definition file anywhere in the
> > FeatureServer download.
>
> Where the xmlns points to shouldn't play any role in the validation
> process, as far as I'm aware. These are just unique identifiers -- so
> long as they are maintained through the schema definitions, they should
> be fine. However, the problem that you're likely having is that there
> *is* no schema for FeatureServer output: it's based on hacking things
> together, not based on following the wfs-basic schema.
>
> My first recommendation would be: tell your PHP parser to not validate
> your XML data. FeatureServer output is going to cause you more pain than
> its worth if you do this.
>
> My second recommendation is to learn enough about XML Schemas to write
> one that works for general FeatureServer output, though I have no idea
> if that's possible. (In the past, I've had to write specific schemas for
> the database/columns being made available, which may well be true here.)
>
>
>
> > I'm wondering - is there a description available
> > anywhere, or has anyone written one? It seems odd that example.com is
> > hardcoded into this, and I think it would be a simple-enough thing to
> patch
> > (possibly adding another var to featureserver.cfg?), so if that's needed
> or
> > wanted, I'd love to pitch in.
>
> I'd recommend first changing the XML file manually to figure out what
> changes you need to make to get your PHP code to accept the file. I
> expect that if it's actually validating XSD, then you're going to be
> needing to do a fair amount more work (though it is possible that simply
> dropping the xsi:schemaLocation will cause PHP to stop moaning...)
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/featureserver/attachments/20081103/3d0684af/attachment.html


More information about the Featureserver mailing list