Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   XML Schema <-> DTD ? equivalent to external ENTITY (http://www.velocityreviews.com/forums/t165169-xml-schema-dtd-equivalent-to-external-entity.html)

Robert Lintner 07-18-2003 01:46 PM

XML Schema <-> DTD ? equivalent to external ENTITY
 
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 ?




Bob Foster 07-19-2003 06:52 PM

Re: XML Schema <-> DTD ? equivalent to external ENTITY
 
include and import.

Bob

"Robert Lintner" <rlintner@etm.at> wrote in message
news:1058534664.685482@newsmaster-03.atnet.at...
> 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 ?
>
>
>




Peter C. Chapin 07-20-2003 01:15 PM

Re: XML Schema <-> DTD ? equivalent to external ENTITY
 
In article <bfcisb$1sv2$1@pc-news.cogsci.ed.ac.uk>,
richard@cogsci.ed.ac.uk 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


Susanne Oberhauser 07-25-2003 11:24 AM

Re: XML Schema <-> DTD ? equivalent to external ENTITY
 
richard@cogsci.ed.ac.uk (Richard Tobin) writes:

> In article <NrgSa.86034$GL4.22868@rwcrnsc53>,
> Bob Foster <bobkfoster@comcast.net> 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


All times are GMT. The time now is 08:44 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57