xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Buroff" <...@lucent.com>
Subject Re: Fw: schema question
Date Wed, 15 Dec 1999 17:02:59 GMT
Sorry about the bad mail format. I've never had the problem before.
I'm using Outlook Express with IE 5.01. What are you reading your
mail with?

Thanks for the information. I wasn't even sure that what I had done
was correct. I gather from your mail that it is correct but that xml4j
hasn't implemented it yet. Makes me feel better.

Thanks for the workaround. Unfortunately, it doesn't work for me. Are
you using xml4j 3.0.0 EA3? I've attached the modified schema file and
the xml file. Unfortunately, it gets the same error. Does it work for


<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE schema SYSTEM "structures.dtd"> -->
<!DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"


<element name="MAIN">
        <archetype name="Main">
                <element ref="OTHER"/>
                <attribute name="xmlns"/>

<element name="dummy1">
        <archetype name="Other" content="empty"/>

<element name="OTHER" type="Other"/>


----- Original Message -----
From: Brett McLaughlin
To: general@xml.apache.org
Sent: Wednesday, December 15, 1999 11:46 AM
Subject: Re: Fw: schema question


I don't know what kind of mail editor you are using... it really
up my mail... can you try to turn off HTML sending and use only plain
text?  Thanks.

I tried your schema several different ways ... it seems that
XML4J has a bug.  I can create the schema using implicit archetypes,
it always works fine.  I can also create explicit archetypes OK.  As
soon as I refer to the explicit archetype,though, it bombs.  In
through the examples, I notice that both IBM's DTD Visual Editor and
samples for IBM XML4J all use _only_ implicit archetypes.  Sounds like
they are still working on that.  So... bad deal in your case.

However, there is a hack ;-)  You can use an implicit archetype, but
give it a name (just what I told you not to do before - this is not
style, but it works).  Then other elements can refer to that archetype
as well.  So your XML Schema could look like:

<?xml version="1.0" encoding="UTF-8"?>

<!-- <!DOCTYPE schema SYSTEM "structures.dtd"> -->
<!DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"


  <element name="OTHER">
    <archetype name="EmptyElement" content="empty"/>

  <element name="COMMENT" type="EmptyElement"/>

  <element name="MAIN">
      <element ref="OTHER"/>
      <attribute name="xmlns"/>


Notice that the COMMENT element refers to the EmptyElement archetype,
which is implicitly defined but explicitly named.  Bad karma, but it
works.  You're not using XML Schema in a production environment, are


View raw message