empty/non-empty element

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    empty/non-empty element

    Hi,

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

    <xs:element name="StaticLay erDataStream" type="xs:hexBin ary">

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

    <StaticLayerDat aStream> </StaticLayerData Stream>

    I have even tried this

    <StaticLayerDat aStream/>

    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
  • Klaus Johannes Rusch

    #2
    Re: empty/non-empty element

    John wrote:
    [color=blue]
    > I have an element StaticLayerData Stream referenced in the schema file.
    > This element can be empty or non-empty in the instance file depending
    > on circumstances.
    >
    > <xs:element name="StaticLay erDataStream" type="xs:hexBin ary">
    >
    > I have even tried this
    >
    > <StaticLayerDat aStream/>
    >
    > but it does not work. Any ideas on how to let the schema identify the
    > element as being empty sometimes AND non-empty sometimes?[/color]

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

    --
    Klaus Johannes Rusch
    KlausRusch@atme dia.net



    Comment

    Working...