empty/non-empty element

Discussion in 'XML' started by John, Jul 15, 2003.

  1. John

    John Guest

    Hi,

    I have an element StaticLayerDataStream referenced in the schema file.
    This element can be empty or non-empty in the instance file depending
    on circumstances.

    <xs:element name="StaticLayerDataStream" type="xs:hexBinary">

    Now in the XML instance file, the parser throws an error when it comes
    across an empty StaticLayerDataStream element like so:

    <StaticLayerDataStream> </StaticLayerDataStream>

    I have even tried this

    <StaticLayerDataStream/>

    but it does not work. Any ideas on how to let the schema identify the
    element as being empty sometimes AND non-empty sometimes?

    Thanks
    John
     
    John, Jul 15, 2003
    #1
    1. Advertising

  2. John wrote:

    > I have an element StaticLayerDataStream referenced in the schema file.
    > This element can be empty or non-empty in the instance file depending
    > on circumstances.
    >
    > <xs:element name="StaticLayerDataStream" type="xs:hexBinary">
    >
    > I have even tried this
    >
    > <StaticLayerDataStream/>
    >
    > but it does not work. Any ideas on how to let the schema identify the
    > element as being empty sometimes AND non-empty sometimes?


    What is the error message you get from the parser?
    <StaticLayerDataStream/> looks prefectly valid.

    --
    Klaus Johannes Rusch

    http://www.atmedia.net/KlausRusch/
     
    Klaus Johannes Rusch, Jul 16, 2003
    #2
    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. edkawas
    Replies:
    0
    Views:
    507
    edkawas
    Jun 24, 2005
  2. Lukas
    Replies:
    3
    Views:
    865
    spiff
    Nov 10, 2005
  3. Marcia Hon

    Check if a directory is empty and empty it

    Marcia Hon, Feb 8, 2004, in forum: C Programming
    Replies:
    8
    Views:
    611
    Dave Thompson
    Feb 14, 2004
  4. Brian Roberts

    empty lists vs empty generators

    Brian Roberts, May 3, 2005, in forum: Python
    Replies:
    12
    Views:
    681
    Jeremy Bowers
    May 4, 2005
  5. HANM
    Replies:
    2
    Views:
    764
    Joseph Kesselman
    Jan 29, 2008
Loading...

Share This Page