(q1) Where is the official source of the current OSM .xsd Schema file?

Checked the Wiki and found this page as a start: http://wiki.openstreetmap.org/wiki/OSM_XML/XSD Is that it?

(q2) How do you modify the xml Export (.osm) file to reference the authoritative .xsd Schema file?

(Note: export writes a .osm file which is XML, and can easily be renamed to .xml)

Speculate you just take line 2 of the .xml file which contains this:

 osm version=... generator=... copyright=... attribution=... license=...

and add in ( ahead of the closing ">" )

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

and

 xsi:noNamespaceSchemaLocation="OSMSchema.xsd"

Provided you have a validated copy of the current OSM .xsd file named OSMSchema.xsd and its located in the same directory.

asked 17 Feb '15, 14:23

rjl's gravatar image

rjl
30224
accept rate: 0%

1

Can you explain in a little more detail what it is that you are actually trying to do?

(17 Feb '15, 14:31) SomeoneElse ♦

Trying to get .osm to load and validate against authoritative .xsd . OSMSchema.xsd (that I found) has xmlns="http://openstreetmap.org/osm/0.6" and targetNamespace="http://openstreetmap.org/osm/0.6" yet .osm files don't utilize a namespace? Project otherwise seems quite mature.

(17 Feb '15, 15:08) rjl
1

This doesn't seem to be a question, or if so is largely rhetorical. Consider rephrasing it, and adding information about why you want to ask the question.

(17 Feb '15, 15:36) SK53 ♦
1

XML files are not required to contain namespace declarations.

(17 Feb '15, 15:37) scai ♦

There is no official xsd schema file, which is why it doesn't appear referenced from within the files.

There's no official schema in any other format either.

permanent link

answered 17 Feb '15, 15:41

Andy%20Allan's gravatar image

Andy Allan
11.8k23121143
accept rate: 30%

Thanks. Good to know.

(17 Feb '15, 17:07) rjl
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×64
×11
×4
×2
×1

question asked: 17 Feb '15, 14:23

question was seen: 4,668 times

last updated: 17 Feb '15, 17:07

powered by OSQA