- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 09 Jun 2003 15:41:34 +0100
- To: "C Baines" <cbaines@westroadchurch.org.uk>
- Cc: <xmlschema-dev@w3.org>
"C Baines" <cbaines@westroadchurch.org.uk> writes:
> I have included some xlinks within the text content of an XML document e.g:
>
> <rhyme>The <link xmlns:xlink="http://www.w3c.org/1999/xlink"
> xlink:href="cat.gif" xlink:show="new">cat</link> sat on the mat</rhyme>
>
> 1. Presumably <rhyme> and any other elements containing <link> need to be
> mixed elements declaring <link> as a child?
Yes.
> 2. Is there any way of declaring <link> just once in the schema so that
> it can be used within any elements at random?
Well, you can declare it once at the top level, but you would still
have to include an <xs:element ref="my:link" minOccurs="0"
maxOccurs="unbounded"/>
in your mixed content models.
> 3. Presumably because I have declared the xlink namespace within <link>
> in the XML document, I don't have to declare all the xlink attributes in the
> schema? Or do I?
If you want the <link> items validated, you'll need to not only import
the XLink namespace, but also a schema which declares all those
attributes. There are several around on the web, none completely
official. See
e.g. http://www.oasis-open.org/committees/ebxml-msg/schema/xlink.xsd
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Monday, 9 June 2003 10:41:41 UTC