Comments (4)
Thanks for contributing the script, @arbakker . I included a link to it in the "How To" page (see commit 41026c2).
from iso-19139-to-dcat-ap.
Thanks for reporting this issue, @jescriu .
I've tried to run the transformation via the GeoDCAT-AP API demo, which uses the PHP implementation, and it works:
It seems that the problem with the proposed Python script is that the etree.parse
function does not support HTTPS.
A possible fix:
import lxml.etree as ET
from urllib2 import urlopen
# The URL of the XML document to be transformed. Here it corresponds to a "GetRecords" output of a fictitious CSW, with the "maxRecords" parameter set to 10.
xmlURL = "http://some.site/csw?request=GetRecords&service=CSW&version=2.0.2&namespace=xmlns%28csw=http://www.opengis.net/cat/csw%29&resultType=results&outputSchema=http://www.isotc211.org/2005/gmd&outputFormat=application/xml&typeNames=csw:Record&elementSetName=full&constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0&maxRecords=10"
# The URL pointing to the latest version of the XSLT.
xslURL = "https://raw.githubusercontent.com/SEMICeu/iso-19139-to-dcat-ap/master/iso-19139-to-dcat-ap.xsl"
xml = ET.parse(urlopen(xmlURL))
xsl = ET.parse(urlopen(xslURL))
transform = ET.XSLT(xsl)
print(ET.tostring(transform(xml), pretty_print=True))
Does this work?
from iso-19139-to-dcat-ap.
I wrote a Python script using urllib.request
from the Python standard library solving this issue. The script accepts urls and file paths as arguments.
from iso-19139-to-dcat-ap.
@jescriu , I updated the Python script as illustrated in #29 (comment) (see 41026c2).
Is this fix addressing your issue?
About your other question:
The XSLT should always return a correct RDF file, irrespective of the tool you're using.
Other options to test it are the GeoDCAT-AP API I mentioned earlier in this thread, or the command line tool above kindly contributed by @arbakker .
from iso-19139-to-dcat-ap.
Related Issues (20)
- Revise mapping of spatial resolution
- Revise mapping of responsible party roles
- Support datatype gsp:geoJSONLiteral HOT 1
- Add OpenAPI 3+ Spec HOT 2
- Check compliance with SHACL definitions HOT 3
- Mapping textual description of distribution encodings to URIs HOT 2
- How to deal with deprecated mappings HOT 2
- dct:spatial should have dct:Location content HOT 2
- Update mapping of code list values for spatial representation type and maintenance frequency HOT 1
- Tag each new version HOT 3
- Trying to convert a simple xml file to geodcat HOT 8
- Align mappings for formats with OP File Types NAL
- Conceptual mapping between INSPIRE Metadata and Geo DCAT AP Metadata HOT 2
- Input for generation of Catalog Class HOT 2
- dcat:themeTaxonomy proprety HOT 1
- Validation error for xsl HOT 2
- Using iso-19139-to-dcat-ap xslt with pycsw?
- modification of the XSLT for HVD HOT 1
- Value must be an instance of vcard:Kind | [Result path] - [http://www.w3.org/ns/dcat#contactPoint]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iso-19139-to-dcat-ap.