Jump to content

Sery

Members
  • Posts

    6
  • Joined

  • Last visited

Sery's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hello. I´m going insane.I´m really, REALLY bad with this, and now its like I´ve locked my brain and the examination is due wednesday. Panic. Can someone who is good at XML and XSD help me?There is something wrong in the xsd..If I remove the link to the xsd, the XML validates without problems. I´ve used xmlvalidation.com because xmllint makes my computer crash. I´ll send the files if someone replies, they are not big, a simple wordlist. Thank you! Kristin
  2. Hello again! Nope, my teacher went all "no-no-no" on me, so I did a new XSD. But, I clearly have my head under my arm and it won´t validate.Will you please help me? Im at my end here, so tired and fed up. Im no good at syntax - at all.
  3. Well, it validates at xmlvalidation.com, but not in xmllint. We should use the command promt and xmllint to validate, so unsure at the moment..
  4. That was easy enough. It was a whole lot of "eh, what?" when I read about namespaces. Thank you! Here are the complete XML and XSD - enjoy! ;D XML <?xml version="1.0" encoding="iso-8859-1" standalone="no"?><?xml-stylesheet type="text/css" href="css.css"?><wordlist xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="wordlist_english_xsd.xsd"><information> <title>Engelsk ordlista</title> <author>Kristin, Mittuniversitetet, ITM</author> <year>2012</year> </information> <wordlist_words> <word>January</word> <word>February</word> <word>Mars</word> <word>April</word> <word>May</word> <word>June</word> <word>July</word> <word>August</word> <word>September</word> <word>October</word> <word>November</word> <word>December</word> </wordlist_words></wordlist> XSD: <?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="wordlist"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="information"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string" minOccurs="0"/> <xs:element name="author" type="xs:string" minOccurs="0"/> <xs:element name="year" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="wordlist_words"> <xs:complexType> <xs:sequence> <xs:element name="word" nillable="true" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element></xs:schema>
  5. I figured it out for the DTD, so that is working now. The XML: <?xml version="1.0" encoding="iso-8859-1" standalone="no"?><?xml-stylesheet type="text/css" href="css.css"?><wordlist xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="wordlist_english_xsd.xsd"><information xml:lang="se"> <title>Engelsk ordlista</title> <author>XXX</author> <year>2012</year> </information> <wordlist_words xml:lang="en"> And then, the schema: (where I haven´t any code for the xml:lang, it just screwed everything up.) <?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="wordlist"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="information"> <xs:complexType> <xs:sequence> <xs:element name="title" type="xs:string" minOccurs="0"/> <xs:element name="author" type="xs:string" minOccurs="0"/> <xs:element name="year" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="wordlist_words"> Also, when I´m already here.. The namespace is confusing to me. What should I have? Thanx!
  6. Hello! I´m almost at my breaking point, please help, I´m going bald! I´ve done a simple wordlist (school project) and it is in three different languages.So, I´ve added the atribte xml:lang but I cannot get it to validate! Just that bit.Tried a few different ways to write it in the DTD and XSD, but nope. This is what it looks like in the XML: <wordlist_words xml:lang="fi"> I need it to work in a external DTD, an INTERNAL DTD, and a schema. Thanx in advance!
×
×
  • Create New...