Test results for Solaris x86

test_004052_xsd_line_alt2

Test description

Test for XSD schema wildcard handling at the root element level.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.xsd -R .

Input data

Word. Two words. Now three words. This is four words.

Schema

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://xmlfy.sourceforge.net"
           xmlns="http://xmlfy.sourceforge.net"
           elementFormDefault="qualified">
  <xs:element name="paragraph">
    <xs:choice>
      <xs:element name="one_word_sentence" type="wordType" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="multi_word_sentence" type="sentenceType" minOccurs="0" maxOccurs="unbounded" />
    </xs:choice>
  </xs:element>
  <xs:complexType name="wordType">
    <xs:sequence>
      <xs:element name="word" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="sentenceType">
    <xs:sequence>
      <xs:element name="startword" type="xs:string" />
      <xs:element name="middleword" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="endword" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>

Output result

<?xml version="1.0" encoding="UTF-8"?>
<paragraph xmlns="http://xmlfy.sourceforge.net"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlfy.sourceforge.net schema.xsd">
  <one_word_sentence>
    <word>Word</word>
  </one_word_sentence>
  <multi_word_sentence>
    <startword>Two</startword>
    <endword>words</endword>
  </multi_word_sentence>
  <multi_word_sentence>
    <startword>Now</startword>
    <middleword>three</middleword>
    <endword>words</endword>
  </multi_word_sentence>
  <multi_word_sentence>
    <startword>This</startword>
    <middleword>is</middleword>
    <middleword>four</middleword>
    <endword>words</endword>
  </multi_word_sentence>
</paragraph>

Goto:   Top of page.   Section "Environment".   Section "Summary".   Section "Test cases".