Jump to content

Search the Community

Showing results for tags 'XSD'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 13 results

  1. Error I receive while implementing this code: Exception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'employee'. One of '{contractemployee}' is expected. What changes shall I make in my code to correctly implement the xml document from the given image Code: XML: <?xml version="1.0" encoding="UTF-8"?> <company> <companyname></companyname> <address></address> <department> <dname></dname> <deptphoneno></deptphoneno> <deptfaxno></deptfaxno> <deptemail></deptemail> <employee> <empid></empid> <ename></ename> <emailid></emailid> <phoneno></phoneno> </employee> <contractemployee> <name></name> <phoneno></phoneno> </contractemployee> </department> </company> XSD: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="catalog"> <xsd:complexType> <xsd:sequence> <xsd:element name="product" maxOccurs="unbounded" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="productname" type="xsd:string"></xsd:element> <xsd:element name="storagenumber" type="xsd:short"></xsd:element> <xsd:element name="dimension"> <xsd:complexType> <xsd:sequence> <xsd:element name="width" type="xsd:byte"></xsd:element> <xsd:element name="heigth" type="xsd:string"></xsd:element> <xsd:element name="depth" type="xsd:byte" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="description" type="xsd:string"></xsd:element> <xsd:element name="supplier" type="xsd:string" maxOccurs="unbounded" minOccurs="0"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
  2. Hello all! I'm having some discussions at work and need some clarification/help 🙂 I'm currently working on XML PACS files (pacs.008.001.02) where timestamps are being used. One of the tags is CreDtTm - Creation Date Time. A simple timestamp as far as I'm aware… Please see XSD scheme definition below: <xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.02" elementFormDefault="qualified"> ... <xs:element name="CreDtTm" type="ISODateTime"/> ... <xs:simpleType name="ISODateTime"> <xs:restriction base="xs:dateTime"/> </xs:simpleType> xs:dateTime should be in format 'CCYY-MM-DDThh:mm:ss.sss' if I'm correct? The issue now is, if I check my input XML file with the corresponding XSD and the tag filled in like (mind the year 22019) <CreDtTm>22019-10-09</CreDtTm> XMLSpy says it's valid. Even if I change the content to something rediculous, e.g. 220000000000019-10-09 XMLSpy says it's valid. Does the CC mean it is a variable lenght and not restricted to 2 digits? Please advice 🙂 Thanks a lot in advance!
  3. Hi all, please pardon me if i post to wrong section (it took me 3 days to even gain access this site). In your xsd tutorial, the Example 2 description is plain wrong, and it is confusing people. The faulty page is here: https://www.w3schools.com/xml/el_all.asp The error must be there for a long time, it even has its own post on stackoverflow https://stackoverflow.com/questions/5677154/how-do-i-make-items-optional-in-xsall Quote: "The example above indicates that the "firstname" and the "lastname" elements can appear in any order and each element CAN appear zero or one time!" To allow each subelement to be missing, the minOccurs attribute must be put to the subelements, not the xs:all itself. Please fix the embarassing error. :-)
  4. JamieY

    Help exporting xml

    Hello. Here is my problem that I really hope someone can help me solve. I work in the parts department at my company. On Monday, my boss is going to ask me to input a list of parts into a website that is going to take me about 4 hours to key in. It's about 400 or more lines of ten key that looks like this 1 123456-001 C14B23 5 123321-001-01 C1521 Repeat that with different numbers about 500 times. I found the website has an upload option so that I can import the parts. I know very little about XML. I got the company to send me an example upload file for the website. I have been playing with it for the last week and have had some success but mostly failure and I don't know why. I have been able to get a file to upload but that file will not save more than one record and will not upload more than one record. Most of the time when I try to export my file, I get an error from excel that says "Cannot save or export XML data. The XML maps in this workbook are not exportable. I took the example XML file they sent me as an example and opened it up in Visual Studio 2013. Then I went to the XML option and chose to save it as an XSD. I then open Excel, and choose the source button, click the XML maps button, load the xsd file that I just created from the XML file and then drag the fields on into the spreadsheet. This has both worked and failed for me. I don't know why it is that I have been able to get it to work and have not. My goal is to export the parts list from our database at work into an Excel sheet, import the XML template that I am trying to create and then copy and paste the parts. Export that as a parts list XML file and upload it to the website thereby saving me about 4 hours of typing. When I take the working example, import it into Excel, It automatically generates the map for me. I add a new line, and then try to export it and it won't. It fails. All the googling in the world has not taught me as to why. I don't understand the rules that Excel points to in order to fix this issue. I thought it had to do with repeating fields and that there needed to be 2 data sets but I can't figure out what that exactly means. I have attached my working example. Can someone please tell me how I can get this into a working spreadsheet template so that I can add rows for my import? Working-Example.xml
  5. Thanks for looking into this issue. I am not sure, whether this is the right forum to post this thread. If not, let me know the right forum to post this thread. I have wellformed XML message. I want to produce a list/report as 1) All Xpath of XML message 2) Xpath , data content for this XPATH Here is an example (Input XML Message) <?xml version="1.0"?><PARTS><TITLE>Computer Parts</TITLE><PART><ITEM>Motherboard</ITEM><MANUFACTURER>ASUS</MANUFACTURER><MODEL>P3B-F</MODEL><COST> 123.00</COST></PART><PART><ITEM>Video Card</ITEM><MANUFACTURER>ATI</MANUFACTURER><MODEL>All-in-Wonder Pro</MODEL><COST> 160.00</COST></PART><PART><ITEM>Sound Card</ITEM><MANUFACTURER>Creative Labs</MANUFACTURER><MODEL>Sound Blaster Live</MODEL><COST> 80.00</COST></PART><PART><ITEM>inch Monitor</ITEM><MANUFACTURER>LG Electronics</MANUFACTURER><MODEL> 995E</MODEL><COST> 290.00</COST></PART></PARTS> The desired output --> I created the following XML list manually /PARTS/TITLE Computer Parts/PARTS/PART[1]/ITEM Motherboard/PARTS/PART[1]/MANUFACTURER ASUS/PARTS/PART[1]/MODEL P3B-F/PARTS/PART[1]/COST 123.00/PARTS/PART[2]/ITEM Video Card/PARTS/PART[2]/MANUFACTURER ATI............................................................... I have XMLSPY, and I do not have additional tools kit associated with XMLSPY. I tried with xml_grep in linux. It need the XPATH as input to get me the data content. I am not able to use xml_grep to extract attributes of XML message. Are there any open source product to produce such report for XML Message? What are the ways to extract XPATHs/XPATH, data content? Thanks for helping.
  6. Hello, Trying to design and configure structure of the Web service that needs to be used in remote client ( thin or thick clients ) systems. Three Web services server suppose to provide full funcionality: 1. extracting from the client local system the data according to the predefined scheme from the central remote point. 2. validating just produced XML by taking it from the queue. 2.1 validation against schema 2.2 validation against the remote ( central ) database - references against registers/catalogues - used codes against other domains - validations on bulks/chunks of data in the XML ( all values of some field/column or two or many of them ) - some special validating procedures that 3. returning validation status through XML list of errors and apropriate logs or in case of passing all controls only notice on success 4. if the validation succeeded the XML is sent to central place in the status ready for unpackaging the data from XML and putting data into relational stables ( same that were used as valid Grateful for references, experiences and suggestion,
  7. Hi i am new to XSD, need some help i have a XML as <Feature> <Mobile value="true" group="Samsung_India,Nokia_Finland,Sony_Japan"/> </Feature> i am validating Mobile tag without "group" attribute as <xsd:element name="Feature"> <xsd:complexType> <xsd:sequence> <xsd:element name="Mobile" type="Boolean"/> <xsd:sequence> <xsd:complexType> My query is to also validate "group" in Mobile tag which has String values with underscore and seperated by commas. and group values are fixed. Want to validate group values and it should validate pattern of values. if someboby give invalid values then it should not validate. Thanks
  8. I have been trying to find a solution to my problem is the last 10 days, and I found nothing. So, I am trying to restrict the Authentication Context XML Schema Definition of SAML 2.0. The XSD document is accessible at http://docs.oasis-open.org/security/saml/v2.0/saml-schema-authn-context-types-2.0.xsd. The part that I am trying to restrict is the one related to this part of the XSD document: <xs:complexType name="PasswordType"> <xs:sequence> <xs:element ref="Length" minOccurs="0"/> <xs:element ref="Alphabet" minOccurs="0"/> <xs:element ref="Generation" minOccurs="0"/> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ExternalVerification" type="xs:anyURI" use="optional"/></xs:complexType><xs:element name="RestrictedPassword" type="RestrictedPasswordType"/><xs:complexType name="RestrictedPasswordType"> <xs:complexContent> <xs:restriction base="PasswordType"> <xs:sequence> <xs:element name="Length" type="RestrictedLengthType" minOccurs="1"/> <xs:element ref="Generation" minOccurs="0"/> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ExternalVerification" type="xs:anyURI" use="optional"/> </xs:restriction> </xs:complexContent></xs:complexType> Well, I do not know how to restrict the RestrictedPassword complex Type. Below is my XSD, that tries to restrict the original XSD document. <?xml version="1.0" encoding="UTF-8"?><xs:schema version="2.0" targetNamespace="urn:m:SAML:2.0:ac:classes:K" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:m:SAML:2.0:ac:classes:K" finalDefault="extension" blockDefault="substitution"> <xs:redefine schemaLocation="http://docs.oasis-open.org/security/saml/v2.0/saml-schema-authn-context-types-2.0.xsd"> <xs:complexType name="RestrictedPasswordType"> <xs:complexContent> <xs:restriction base="RestrictedPasswordType"> <xs:sequence> <xs:element ref="Length" minOccurs="0"/> <xs:element ref="Generation"/> <xs:element ref="Extension" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ExternalVerification" type="xs:anyURI" use="optional"/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:redefine> </xs:schema> When I try to validate this XSD in this tool http://www.utilities-online.info/xsdvalidation/#.UwJAzK69h31 it returns me an error, that I do not know how to fix. Any help is welcome. Thanks! Domenech, Marlon
  9. As a first-time learner of XSD, I found the use of "http://www.w3schools.com" as an example of a namespace and "http://www.w3schools.com/XMLSchema" as a literal namespace to be confusing. Perhaps where "http://www.w3schools.com/" is not literrally used, it might be better to use "example.com". Visit this link to see what I'm talking about: http://www.w3schools.com/schema/schema_schema.asp After I figured that part out, the rest was good. Thanks.
  10. In the xml schema data type --> date allows date as yyyy-mm-dd format by default.How can we modify it so that it accepts yyyy/mm/dd format style instead ?
  11. Hi to all, I need a little help about understating SOAP and xml shema. Client who is sending me some data send as shema.xsd in which all xml attributes are defined. As this is .xsd file I do not know if this goes for soap communication. I have made a parser in php which parse me all attributes and save it to mysql. First I was having a problem because I did not get any body attributes in http post ($_POST, I just get head, where was few SOAP parameters). I have to do it like: soap_response = file_get_contents('php://input'); Ok, now I get all parameter and my apache sends 200 OK. Problem is that on other side my client gets: ServerWsError [Could not create message from InputStream: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?] Where could be a problem? This is my
  12. Hi to all!I've a question to ask to you.If i have a simple type, i know how to set any restriction, like this: ....<xs:element name="age" type="integer"><xs:simpleType> <xs:restriction base="xs:integer"> <xs:minInclusive value="3"/> <xs:maxInclusive value="10"/> </xs:restriction></xs:simpleType></xs:element>.... So i can only put a integer number included among [3,10].if i want to do this in a complexType like here ...<xs:element name="person"><xs:complexType><xs:sequence> <xs:element name="age" type="xs:integer">...</xs:sequence></xs:complexType></xs:element>.... it should be something like this ...<person><age>99</age></person>... but if i want to set limits to integer value age?
  13. jo_rocks

    dtd problem

    Hi all, I have the follow problem, I have an xml file that have this, this xml file can't be changed: <root> <title>Hello</title> <content> <title>Weekend</title> </content></root> I must have a DTD that must validate the xml, now the problem is that I have two nodes with the same name title, this is my proposal, but it doesn't pass the validation, because I can't declare the same name more than once: <!ELEMENT root (title, content)><!ELEMENT title (#PCDATA)><!ELEMENT content (title)><!ELEMENT title (#PCDATA)> This is a school project, and I am obligated to use a dtd to validate an xml. Thanks all!
×
×
  • Create New...