Total newb question. I've played with XML a few times over the years.
Now I need to validate an XML doc against an XSD. I've tried using NetBeans, XMLSpy, Visual Studio, and a Perl script and all are failing to find/parse the XSD as it is identified in the XML doc. The top of the XML doc looks like:
The XSD file is well formed and is where the xsi:schemaLocation attributes says it should be.
None of the validation engines in any of the software packages I'm trying to use is finding the xsd file.
It appears to me that the xsi:schemaLocation content is mal-formed. Shouldn't there be two items in that content instead of the one fully qualified path to the xsd file?
Thanks,
'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
Now I need to validate an XML doc against an XSD. I've tried using NetBeans, XMLSpy, Visual Studio, and a Perl script and all are failing to find/parse the XSD as it is identified in the XML doc. The top of the XML doc looks like:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<om:CompositeObservation
xmlns:om="[URL unfurl="true"]http://www.opengis.net/om/1.0"[/URL]
xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL]
xmlns:gml="[URL unfurl="true"]http://www.opengis.net/gml/3.2"[/URL]
xmlns:swe="[URL unfurl="true"]http://www.opengis.net/swe/1.0.2"[/URL]
xmlns:ioos="[URL unfurl="true"]http://www.noaa.gov/ioos/0.6.1"[/URL]
xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL]
gml:id="CurrentsVerticalProfileCollectionTimeSeriesObservation"
[b]xsi:schemaLocation="[URL unfurl="true"]http://www.csc.noaa.gov/ioos/schema/IOOS-DIF/IOOS/0.6.1/schemas/ioosObservationSpecializations.xsd[/URL][/b]">
<!--==============================================-->
<!-- Information generated on 2008-10-23T13:53:04Z-->
<!-- by these experimental services are valid at -->
<!-- this time only. -->
<!--==============================================-->
<gml:description>Currents observation at a collection of profiles at a series of times</gml:description>
<gml:name>NOAA.NOS.CO-OPS observations at station ID cb0402</gml:name>
... xml doc truncated for brevity ...
The XSD file is well formed and is where the xsi:schemaLocation attributes says it should be.
None of the validation engines in any of the software packages I'm trying to use is finding the xsd file.
It appears to me that the xsi:schemaLocation content is mal-formed. Shouldn't there be two items in that content instead of the one fully qualified path to the xsd file?
Code:
xsi:schemaLocation="namespace/uri/of/some/sort filename.xsd"
Thanks,
'hope this helps
If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.