Entering a URI when adding schema (Word '07)

S

SDP

Hello all.
I am at a complete loss when I am prompted to enter a URI for the schema I
am attempting to add to the library. The box that comes up after I have
browsed for my schema is the "Schema Settings" box. What do I need to type
here for the URI box? An actual URI or URL? A made-up one? This seems to
be the root of my schema-attaching problems. (If I do not type whatever Word
'07 wants in this URI box, it encounters an error and closes.)
Also, what should I be typing in the "Alias" box? Any old name that I will
recognize?
Really confused.
 
P

Peter Jamieson

Are you seeing an error message, or is Word just crashing without warning?

What should happen, broadly speaking, is that if the schema defines a
targetNamespace in its xsd:schema element, e.g.

targetNamespace=http://schemas.pjmsn.me.uk/SAMPLE01

then Word should fill in the URI field in the "Schema Settings" box and grey
it out so that you cannot edit it. Otherwise, you have to invent your own
URI and insert it.

The thing to bear in mind is that these URIs are essentially meaningless -
as long as they conform to the necessary rules for constructing a URI (and I
could not tell you what they are without looking them up myself) they are
there purely to provide a name for the namespace. The reason that namespace
URIs typically look like http URLs is because many people and organisations
follow a convention where they use a domain that they own as the prefix to
all their namespace defintions. As long as no-one else contravenes that
convention, and as long as the domain name owner assigns unique names to
their Namespaces, there will be no namespace name clashes. But the schema
doesn't actually have to be located at

http://schemas.pjmsn.me.uk/SAMPLE01

There doesn't even have to be a folder at that location, or a website there
(there isn't!). In theory, there doesn't even have to be a domain
pjmsn.me.uk, although as it happens, there is.

As far as I know, the Alias name is supposed to be a "friendly" name that
appears, for example, in the list of Available schemas, the list of Schemas
in the schema library, and so on. I don't know what exactly is allowed for
that name either, but for example in the above case I'd probably use
SAMPLE01.

Schema URIs must be unique within the schema library (it is possible that
the problem you are having is that you have already used the URI you are
trying to insert, although I would expect to see a message in that case.
Word maintains a schema cache which may still be lurking if you have not
closed down every instance of Word before trying again). Alias names do not
have to be unique within the schema library, but it's probably helpful if
they are. As far as I know, Word never used the alias name in any XML it
saved, at least in Word 2003: it either used the URI, in the case of XML
data-only files, or an internally-generated unique namespace alias:URI name
such as ns1:http://schemas.pjmsn.me.uk/SAMPLE01 when saving as
WordProcessingML.

Peter Jamieson
 
S

SDP

Thank you for your help. To answer your question, Word was just crashing, no
warnings.

The following namespaces are in a spec S1000D schema that has been provided
to me. Is there one in particular that I shouold enter when prompted for the
URI ? (And if so, why?)

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/1999/xlink"
schemaLocation="xlink.xsd"/>
<xs:import namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
schemaLocation="rdf.xsd"/>

Thanks again, Peter.
 
P

Peter Jamieson

Tell you what - if you can despam my email address (remove KillmapS) and
send me the complete Schema, I'll see what happens if I try to import it
here in either Word 2003 or 2007. Sorry, but at this point it's the only
thing I can think of to do.

Peter Jamieson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top