Skip to content

Commit

Permalink
Merge pull request #79 from camptocamp/ignore-xsd-namespace-for-type
Browse files Browse the repository at this point in the history
Allow using xs: prefix for feature type attributes
  • Loading branch information
jahow authored Oct 25, 2024
2 parents 4f311f2 + e9c2a93 commit d8cccda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions fixtures/wfs/describefeaturetype-pigma-1-1-0-xsd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="axe" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="cumuld" nillable="true" type="xsd:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="cumulf" nillable="true" type="xsd:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="plod" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="absd" nillable="true" type="xsd:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="plof" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="absf" nillable="true" type="xsd:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="categorie" nillable="true" type="xsd:short"/>
<xsd:element maxOccurs="1" minOccurs="0" name="axe" nillable="true" type="xs:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="cumuld" nillable="true" type="xs:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="cumulf" nillable="true" type="xs:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="plod" nillable="true" type="xs:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="absd" nillable="true" type="xs:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="plof" nillable="true" type="xs:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="absf" nillable="true" type="xs:long"/>
<xsd:element maxOccurs="1" minOccurs="0" name="categorie" nillable="true" type="xs:short"/>
<xsd:element maxOccurs="1" minOccurs="0" name="geom" nillable="true" type="gml:LineStringPropertyType"/>
</xsd:sequence>
</xsd:extension>
Expand Down
2 changes: 1 addition & 1 deletion src/wfs/featuretypeinfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function parseFeatureTypeInfo(
)[0];
const typeElementsEls = findChildrenElement(complexTypeEl, 'element', true);
const properties = typeElementsEls
.filter((el) => getElementAttribute(el, 'type').startsWith('xsd:'))
.filter((el) => /^xsd:|^xs:/.test(getElementAttribute(el, 'type')))
.reduce(
(prev, curr) => ({
...prev,
Expand Down

0 comments on commit d8cccda

Please sign in to comment.