Jump to content

craigewens

Members
  • Content Count

    7
  • Joined

  • Last visited

Everything posted by craigewens

  1. Marvellous! thank you very much.I have incorporated the pattern update, I agree, it is much nicer.Thanks again for all your assistance!
  2. Thank you!I have taken on your advice and implemented.Here are my final amendmentsXML <SCAMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SCAMA - Schema.xsd"> <USERS> <USER>name1</USER> <USER>name2</USER> <USER>name3</USER> <USER>name4</USER> </USERS> <GROUPS> <GROUP id="group1"> <PORTS> <PORT id="port1"> <SOURCE_FILES> <FILE type="txt">c:\group1\port1\source_file1.txt</FILE> <FILE type="txt">c:\group1\port1\source_fi
  3. Once again, thank you for your help.I have heeded your comments and updated my xsd and xml file accordingly.XML <SCAMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SCAMA - Schema2.xsd"> <USERS size="4"> <USER>name1</USER> <USER>name2</USER> <USER>name3</USER> <USER>name4</USER> </USERS> <GROUPS size="1"> <GROUP id="group1"> <PORTS size="2"> <PORT id="port1" size="2"> <SOURCE_FILES size="4"> <FILE>c:\group1\port1\source_file1.txt</F
  4. Thank you for your reply... i am using XML Spy to validate the XML and it didn't get as far as stating that i forgot the units part With regards to the choice section i believe we are misunderstanding what i wish to achieve.I wold like the port node to contain either a single element called <FREQ_MASTER> or three elements called <START_FREQ>, <STOP_FREQ> and <POINTS>.So the XML file i showed above has two different contents for PORT, of which both should be valid... i just can't get the schema to adhere to my desires.With regards to your comment about the , can you
  5. It is possible, instead of this line: <xs:attribute name="date" type="xs:date" use="required" form="qualified"/> you need to have something like this: <xs:attribute name="date" type="carType" use="required" form="qualified"/> then add this section somewhere: <xs:simpleType name="carType"> <xs:restriction base="xs:string"> <xs:enumeration value="Audi"/> <xs:enumeration value="Golf"/> <xs:enumeration value="BMW"/> </xs:restriction></xs:simpleType> Obviously carType is not what you need, but it's an example lifted right off the w3schoo
  6. Hi all,Here is my XML file: <SCAMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SCAMA - Schema2.xsd"> <USERS size="4"> <USER>last_first1</USER> <USER>last_first2</USER> <USER>last_first3</USER> <USER>last_first4</USER> </USERS> <GROUPS size="1"> <GROUP id="group1"> <PORTS size="2"> <PORT id="port1" size="2"> <SOURCE_FILES size="4"> <FILE>c:\group1\port1\source_file1.txt</FILE> <FILE>c:\group1\port1\source_file2.txt<
  7. At first glance you are missing the XML declaration at the start of your schema.http://www.w3schools.com/schema/schema_howto.asp scroll down to get to the title "An XML Schema"
×
×
  • Create New...