Suzee Parker - 2009-05-01

When I try to validate an Open Laszlo .lzx file using the Schema that they provide in the tools folder of their current distribution, I get the message:

   Unable to parse schema file.

After much trial and error, I believe the parser doesn't like the Schema tag: <xs.union>.  Is there a work-a-round for this?  It is a problem with the XMLtools.dll or the Ext_Lib DLLs?  

I don't really understand XML Schemas and what a <xs.union> is, but does anyone know of a reasonable replacement.  It is used in a couple of ways:

  <xs:simpleType name="boolean">
    <xs:union memberTypes="lzx:booleanLiteral lzx:constraint"/>
  </xs:simpleType>

  <xs:simpleType name="inheritableBooleanLiteral">
    <xs:union memberTypes="lzx:booleanLiteral">
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="inherit"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <xs:element name="a">
    <xs:complexType mixed="true">
      <xs:group ref="lzx:htmlText"/>
      <xs:attribute name="href" use="required" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>The link target.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="target">
        <xs:simpleType>
          <xs:union>
            <xs:simpleType>
              <xs:restriction base="xs:token">
                <xs:enumeration value="_blank"/>
              </xs:restriction>
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="xs:token">
                <xs:enumeration value="_parent"/>
              </xs:restriction>
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="xs:token">
                <xs:enumeration value="_self"/>
              </xs:restriction>
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="xs:token">
                <xs:enumeration value="_top"/>
              </xs:restriction>
            </xs:simpleType>
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:pattern value="[a-zA-Z][a-zA-Z0-9\-_:.]*"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:union>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

I could send you a copy of the lzx.xsd, and a version that I am trying to create that gets through the parser.  However, at the moment, my modified version crashes NotePad++ when I use XML Tools to validate a simple .lzx file against it.  That is if anyone is interested.

Sue