Jump to content

SpaceCowboy850

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SpaceCowboy850

  • Rank
    Newbie
  1. I'm doing some code generation, and for coding reasons, I want to derive from the same base type for all of my XSDs. So this works: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.02"> <xs:include schemaLocation="MessageBase.xsd"/> <xs:element name="ServiceRequest" type="ServiceRequestType_VersionInfo_Request"/> <xs:complexType name="ServiceRequestType_VersionInfo_Request" mixed="true"> <xs:complexContent> <xs:extension base="MessageBase"> <!-- insert schema definition stuff here --> </xs:extension> </xs:complexContent> </xs:complexType></xs:schema> In another file, I have this: <?xml version="1.0" encoding="UTF-8"?><!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by VeriFone, Inc. (VeriFone, Inc.) --><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.5"> <xs:complexType name="MessageBase"/></xs:schema> But I need that first file in its own namespace. If i set a "targetNamespace" on the first file (to put it in its own namespace), then it complains it can't find the MessageBase complexType. I'm not sure what I'm doing wrong. Any ideas?
  2. Yeah, if it was just 1 file, it wouldn't be a big deal. As it is it is over 100 files, that are all different. I hadn't heard of XQuery, I'll take a look at that.
  3. I have a XSD that looks something like this: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.02"> <xs:include schemaLocation="Basic_Types.xsd"/> <xs:element name="MyElement"> <xs:complexType mixed="true"> <xs:sequence> <xs:element name="data"> <xs:complexType> <xs:sequence> <xs:element name="timeStamp" type="specialtime"/> <xs:element name="DeviceClass"> <xs:complexType> <xs:sequence> <xs:element name="MaxAmount" type="Amount"/> <xs:element name="MaxVolume" type="Volume"/> </xs:sequence> <xs:attribute name="Type" type="Type" use="required" fixed="FP"/> <xs:attribute name="DeviceID" type="DeviceID" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="ApplicationSender" type="ApplicationSender" use="required"/> <xs:attribute name="WorkstationID" type="WorkstationID" use="required"/> </xs:complexType> </xs:element> </xs:schema> I want to change it to look something like this: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.02"> <xs:include schemaLocation="Basic_Types.xsd"/> <xs:complexType name="DeviceClass"> <xs:sequence> <xs:element name="MaxAmount" type="Amount"/> <xs:element name="MaxVolume" type="Volume"/> </xs:sequence> <xs:attribute name="Type" type="Type" use="required" fixed="FP"/> <xs:attribute name="DeviceID" type="DeviceID" use="required"/> </xs:complexType> <xs:complexType name="data"> <xs:sequence> <xs:element name="timeStamp" type="specialtime"/> <xs:element name="DeviceClass" type ="DeviceClass"/> </xs:sequence> </xs:complexType> <xs:complexType mixed ="true" name ="MyElement"> <xs:sequence> <xs:element name="data" type ="data"> </xs:element> </xs:sequence> <xs:attribute name="ApplicationSender" type="ApplicationSender" use="required"/> <xs:attribute name="WorkstationID" type="WorkstationID
×
×
  • Create New...