Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML Schema <-> DTD ? equivalent to external ENTITY

Reply
Thread Tools

XML Schema <-> DTD ? equivalent to external ENTITY

 
 
Robert Lintner
Guest
Posts: n/a
 
      07-18-2003
Hi,

I woult like to switch from DTD to XML-Schema and am looking for an equivalent
to external ENTITY for composition of an xml file from modules

--- my.dtd --
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ENTITY module1 SYSTEM "module1.xml">
<!ENTITY module2 SYSTEM "module2.xml">
.....

--- my.xml --- ( + module1.xml, module2.xml )
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE my SYSTEM "my.dtd">
<my>
&module1;
&module2;
</my>

.... modul1.xml and modul2.xml are included in my.xml and validated with my.dtd
together.

how could I realize this with XML Schema ?

thanks in advance

Robert

P.S.: the modules should be validated together because of common ID/IDREF scope
I know XML Schema can be composed of multiple files with <include> and <import>
but xml data ?



 
Reply With Quote
 
 
 
 
Bob Foster
Guest
Posts: n/a
 
      07-19-2003
include and import.

Bob

"Robert Lintner" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I woult like to switch from DTD to XML-Schema and am looking for an

equivalent
> to external ENTITY for composition of an xml file from modules
>
> --- my.dtd --
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!ENTITY module1 SYSTEM "module1.xml">
> <!ENTITY module2 SYSTEM "module2.xml">
> ....
>
> --- my.xml --- ( + module1.xml, module2.xml )
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE my SYSTEM "my.dtd">
> <my>
> &module1;
> &module2;
> </my>
>
> ... modul1.xml and modul2.xml are included in my.xml and validated with

my.dtd
> together.
>
> how could I realize this with XML Schema ?
>
> thanks in advance
>
> Robert
>
> P.S.: the modules should be validated together because of common ID/IDREF

scope
> I know XML Schema can be composed of multiple files with <include> and

<import>
> but xml data ?
>
>
>



 
Reply With Quote
 
 
 
 
Peter C. Chapin
Guest
Posts: n/a
 
      07-20-2003
In article <bfcisb$1sv2$(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...

> The most straightforward solution is to continue using entities. You
> can use a DTD for entities and a schema for validation.


Interestingly it appears to be impossible to get Xerces-J v2.4.0 (at
least) to validate such an arrangement. In particular, if one turns on
schema validation, then DTD validation is also turned on. Since the DTD
does not declare the elements (if it only provides entities), the result
is a large stream of validation errors about undeclared elements coming
from the DTD validator.

The Xerces documentation talks about this issue and basically says there
is currently no resolution. That seems hard to believe. Does anyone here
know anything to the contrary?

Peter

 
Reply With Quote
 
Susanne Oberhauser
Guest
Posts: n/a
 
      07-25-2003
(E-Mail Removed) (Richard Tobin) writes:

> In article <NrgSa.86034$GL4.22868@rwcrnsc53>,
> Bob Foster <(E-Mail Removed)> wrote:
>
> >include and import.

>
> No, those are for composition of schemas, not documents. They correspond
> very roughly to parameter entities rather than general entities.
>


how about http://www.w3.org/TR/xinclude/ ?


Susanne
 
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
New to xml schema - does the dtd/schema validation happens always ? pramodr XML 3 04-05-2009 12:10 PM
How to relate a SQL based entity with an Object based entity in Entity Framework markla ASP .Net 1 10-06-2008 09:42 AM
[rnc schema] how to refer to a file (equivalent of (dtd) ENTITY) Le TeXnicien de Surface XML 4 02-22-2008 08:27 AM
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



Advertisments