XML Schema <-> DTD ? equivalent to external ENTITY

Discussion in 'XML' started by Robert Lintner, Jul 18, 2003.

  1. 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 ?
     
    Robert Lintner, Jul 18, 2003
    #1
    1. Advertising

  2. Robert Lintner

    Bob Foster Guest

    include and import.

    Bob

    "Robert Lintner" <> wrote in message
    news:...
    > 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, Jul 19, 2003
    #2
    1. Advertising

  3. In article <bfcisb$1sv2$>,
    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
     
    Peter C. Chapin, Jul 20, 2003
    #3
  4. (Richard Tobin) writes:

    > In article <NrgSa.86034$GL4.22868@rwcrnsc53>,
    > Bob Foster <> 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
     
    Susanne Oberhauser, Jul 25, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,545
    Markus
    Nov 23, 2005
  2. Stanimir Stamenkov
    Replies:
    3
    Views:
    1,265
    Stanimir Stamenkov
    Apr 25, 2005
  3. Le TeXnicien de Surface
    Replies:
    4
    Views:
    525
    Le TeXnicien de Surface
    Feb 22, 2008
  4. markla
    Replies:
    1
    Views:
    549
    Steven Cheng
    Oct 6, 2008
  5. pramodr
    Replies:
    3
    Views:
    842
    Peter Flynn
    Apr 5, 2009
Loading...

Share This Page