Jump to content

stephen1313

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About stephen1313

  • Rank
    Newbie
  1. I would like to create an xsl file that takes XML info and displays it in HTML.XML format is:<Entry> <Author> <FirstName>joe</FirstName> <LastName>smith</LastName> </Author> <Author> <FirstName>bill</FirstName> <LastName>smith</LastName> </Author> <Author> <FirstName>dave</FirstName> <LastName>smith</LastName> </Author> <Author> <FirstName>mary</FirstName> <LastName>smith</LastName> </Author> <Title>cool writings<
  2. Is there a tool that will read my XML file and infer an XSLT file?
  3. Thanks for your help.I think I am close to having this done.Here is my code now:<?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"><xs:element name="letter"> <xs:complexType> <xs:attribute name="date" type="xs:string"/> <xs:element name="to" type="xs:normalizednormalizedString"/> <xs:complexType> <xs:attribute name="first" type="xs:normalizedString"/> <xs:attribute name="last" type="xs:normalizedString"/> </xs:complexType> <x
  4. Here is an update for those of you helping me out:I have updated my code to the following:<?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"><xs:element name="letter"> <xs:attribute name="date" type="xs:normalizedString"/> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:normalizednormalizedString"/> <xs:element name="first" type="xs:normalizedString"/> <xs:element name="last" type="xs:normalizedString"/> </xs:sequence>
  5. Thanks for helping with this.I feel like I am getting there. It is not quite like the DTD stuff I did where you could nest the attributes for the elements.Here is what I have now and my errors:XSD file:<?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"><xs:element name="letter"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:normalizednormalizedString"/> <xs:element name="from" type="xs:normalizedString"/> <xs:element name="title" type="xs:no
  6. Ok, here are the errors I get now:Ln 12 Col 44 - s4s-elt-must-match.1: The content of 'letter' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: attribute.Ln 6 Col 62 - src-resolve.4.2: Error resolving component 'xs:normalizednormalizedString'. It was detected that 'xs:normalizednormalizedString' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:/C:/lettersl.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xs:normalizednormalized
  7. Thanks for the help. When I did that, it really helped.I now have the following errors:Ln 5 Col 64 - s4s-elt-invalid-content.1: The content of '#AnonType_letter' is invalid. Element 'element' is invalid, misplaced, or occurs too often.Ln 10 Col 15 - s4s-elt-must-match.1: The content of 'letter' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: attribute.
  8. Learning XML and I need help.I have an xml file and I want to create a xsd file for it.I have written my file, but am experiencing errors when trying to validate the xml to my xsd.Any pointing in the right direction you can give would be appreciated.XML file:<?xml version="1.0"?><letter date="2005/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://some-where letter.xsd"> <to> <first>smith</first> <last>Lee</last> </to> <from> <first>Sylvie</first> <m
×
×
  • Create New...