Jump to content

Bassman

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Bassman

  • Rank
    Newbie
  1. It's working nowThanks a lot, boen_robot!!!!must have made a mistake firsttime aroundand I use <oXygen/> as a validatorThanks agian!
  2. Furthermore, I removed all the "pr" references in the XSD and the XMLI get 2 errors:- Attribute 'file_id' is not allowed to appear in element 'Premiums'.- Attribute 'file_id' must appear on element 'Premiums'.I like the irony in that :-)
  3. Ok on the first partBut when I use pr:file_id="1" in my XML, it says: The prefix "pr" for attribute "pr:file_id" associated with an element type "Premiums" is not bound.And when I remove the pr in <xs:attribute ref="file_id" use="required"> it syas: Error resolving component 'file_id'. It was detected that 'file_id' has no namespace, but components with no target namespace are not referenceable from schema document 'file:/C:/Development/BatchServer/Output/OUTPUT/Premiums.xsd'.And also, I received the XSD from the customer, so i'd rather not alter it, unless not possible otherwiseTIA
  4. <?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http:/abvvmetaal.be/Premiums" xmlns:pr="http:/abvvmetaal.be/Premiums"><!--definition of attributes--> <xs:attribute name="file_id" type="xs:string"/> /////ALL OTHER DEFINITIONS <xs:element name="Premiums" > <xs:complexType> <xs:sequence> <xs:element ref="pr:Header" minOccurs="1" maxOccurs="1"/> <xs:element ref="pr:Premium" maxOccurs="unbounded"/> </xs:sequence>
  5. Hi,I have an XML-document which I need to verify with an XSDI have added all the namespace and xsd info to the root element of the xml-fileBut the root element also has an attribute file_id (specified as required in the xsd)But when I try to validate it, it says that the attribute isn't allowed thereWhat's wrongThis is what the xml-file looks like:<?xml version="1.0" encoding="UTF-8"?><Premiums xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="C:\Development\BatchServer\Output\OUTPUT Premiums.xsd" file_id="1" > <Header> <Version>1</Version
×
×
  • Create New...