Declare entities in xml schema

This should cover W3C XML Schema, Relax NG and DTD related problems.
cleciovarjao
Posts: 2
Joined: Fri Feb 26, 2010 1:42 am

Declare entities in xml schema

Post by cleciovarjao » Fri Feb 26, 2010 1:48 am

In DTD, I can easily create entities which are displayed in the entities view. However, is it possible to declare entities using xsd? Or How can I declare using DTD and embed it in my schema file (xsd).
I've tried "Enable DTD/XML Schema in doucment type detection", and added the following in my schema file:

Code: Select all

<!DOCTYPE root
[
<!ENTITY eacute "é&#xE9;">
]>
thanks.

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Re: Declare entities in xml schema

Post by george » Fri Feb 26, 2010 11:46 am

No, neither XML Schema nor other schema languages provide a replacement for DTD entities. However, you should be able to use entities in addition to other schema languages. You need to declare the entities in the document you want to use them.
In oXygen please make sure that you have not disabled the Options->Preferences -- XML -- XML Parser -- "Ignore the DTD for validation if a schema is also specified" option if you want to use the DTD only for entity resolution.

Best Regards,
George
George Cristian Bina

Post Reply