Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Character entities and XML Schema

Reply
Thread Tools

Character entities and XML Schema

 
 
kamp@inl.nl
Guest
Posts: n/a
 
      07-21-2005
Hello,

Below is a snippet from a schema. The second enumeration should contain
an i umlaut (archa´sch) but when I use this schema with Altova's
Stylevision software the iumlaut is not displayed properly. So I
changed it into a character entity. I tried several entity declarations
(examples found on the web) but none of them worked i.e. Stylevision
refused to load the schema. So, I want to know the following: is it
possible to use character entities in schemas? If yes, what is the
proper way to declare them in a schema?

<xs:element name="Tijd" minOccurs="0" maxOccurs="unbounded">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="verouderend"/>
<xs:enumeration value="archasch"/>
<xs:enumeration value="neologisme"/>
<xs:enumeration value="overig"/>
</xs:restriction>
</xs:simpleType>
</xs:element>

Thanks.

Peter van der Kamp

 
Reply With Quote
 
 
 
 
Rinus Luijmes
Guest
Posts: n/a
 
      07-22-2005
On 21 Jul 2005 07:46:09 -0700, in comp.text.xml you wrote:

>If yes, what is the proper way to declare them in a schema?


I'm not sure but ï instead of i umlaut works for me.
See: http://www.htmlhelp.com/reference/ht...es/latin1.html

Groeten,

Rinus Luijmes.
 
Reply With Quote
 
 
 
 
C. M. Sperberg-McQueen
Guest
Posts: n/a
 
      07-26-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) writes:

> Hello,
>
> Below is a snippet from a schema. The second enumeration should contain
> an i umlaut (archa´sch) but when I use this schema with Altova's
> Stylevision software the iumlaut is not displayed properly. So I
> changed it into a character entity. I tried several entity declarations
> (examples found on the web) but none of them worked i.e. Stylevision
> refused to load the schema.


Detailes of the entity declarations you used would be
helpful here.

> So, I want to know the following: is it
> possible to use character entities in schemas? If yes, what is the
> proper way to declare them in a schema?


A schema document is an XML document like any other;
give it a doctype declaration and declare 'iuml' (or
whatever name you're using) there. If your schema tools
don't read the external DTD subset, you may be forced
to put the declaration for the entity into the internal
subset. If your tools interpret the existence of a
DOCTYPE declaration as an instruction to validate the
schema document and treat invalidity as a fatal error,
you might wish to look for other tools; if you can't
do that or just want to live with the tools you've
got, you can make the doctype declaration point to
the DTD for schema documents which is part of the
XML Schema spec.

Alternatively, your problem may be that your tools
don't accept the ´ character only because of an
encoding problem: if your XML declaration explicitly
or implicitly tells the software to expect UTF-8,
and you hand it a document encoded in ISO 8859-1,
they have a right to complain.

Third alternative: use a numeric character reference,
not a general-entity reference. No declaration needed,
and no useful name, just a decimal or hex number,
useful for all of us who have memorized the UCS
character tables.

I hope this helps.

--C. M. Sperberg-McQueen
World Wide Web Consortium
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about character entities in XML and PCI security compliance tempest@ucla.edu XML 7 08-11-2008 08:42 PM
web.xml / XML schema issue, why do some XML schema attributes disappear asciz@starmail.com Java 3 02-20-2007 09:56 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
HTML::Entities::encode() returning wrong(?) entities Jim Higson Perl Misc 3 07-25-2004 09:13 PM
XML DTD or schema for representing entities and relationships (SQL)? Simon Brooke XML 0 10-12-2003 02:05 PM



Advertisments