Click here to Skip to main content
15,902,299 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: XML transform to SQL by XSL Pin
AndieDu7-Sep-08 13:47
AndieDu7-Sep-08 13:47 
GeneralRe: XML transform to SQL by XSL Pin
led mike8-Sep-08 5:02
led mike8-Sep-08 5:02 
GeneralRe: XML transform to SQL by XSL Pin
AndieDu8-Sep-08 13:38
AndieDu8-Sep-08 13:38 
QuestionUsing XML to represent parameter data (VST) Pin
Leslie Sanford31-Aug-08 16:41
Leslie Sanford31-Aug-08 16:41 
QuestionGeocoding using google service Pin
mkanna29-Aug-08 6:21
mkanna29-Aug-08 6:21 
AnswerRe: Geocoding using google service Pin
led mike2-Sep-08 5:54
led mike2-Sep-08 5:54 
QuestionSchema and derived types Pin
Russell Jones29-Aug-08 4:56
Russell Jones29-Aug-08 4:56 
AnswerRe: Schema and derived types Pin
Erik Westermann10-Sep-08 4:45
professionalErik Westermann10-Sep-08 4:45 
From what I can see, you have a couple of problems:

* Everything is in lower-case, so complextype is not the same as the (correct) complexType. (This also applies to complexcontent/complexContent, etc)

* The complexType 'transactions' contains a sequence that contains a choice. You cannot limit a choice in this way. Here is the right way:

<xs:complexType name="transactions">
<xs:sequence >
<xs:element name="transaction" type="transaction" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>

So I removed the choice to get it to work.

For reference, here is what the final schema looks like:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="rootelement" type="docroot" />
<xs:complexType name="docroot">
<xs:sequence>
<xs:element name="transactions" type="transactions" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="transactions">
<xs:sequence >
<xs:element name="transaction" type="transaction" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="transaction" abstract="true">
<xs:sequence>
<xs:element name="content" minOccurs="1" maxOccurs="1" />
<xs:element name="extracontent" minOccurs="0" maxOccurs="1" />
<xs:element name="noextracontent" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="type" />
</xs:complexType>
<xs:complexType name="transaction1">
<xs:complexContent>
<xs:restriction base="transaction">
<xs:sequence>
<xs:element name="content" minOccurs="1" maxOccurs="1" />
<xs:element name="extracontent" minOccurs="1" maxOccurs="1" />
<xs:element name="noextracontent" minOccurs="0" maxOccurs="0" />
</xs:sequence>
<xs:attribute name="type" fixed="1" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="transaction2">
<xs:complexContent>
<xs:restriction base="transaction">
<xs:sequence>
<xs:element name="content" minOccurs="1" maxOccurs="1" />
<xs:element name="extracontent" minOccurs="0" maxOccurs="0" />
<xs:element name="noextracontent" minOccurs="1" maxOccurs="1" />
</xs:sequence>
<xs:attribute name="type" fixed="2" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:schema>

Erik Westermann - wWorkflow.net - BizTalk Consulting Services
SOA * ESB * BPI * SaaS ... forget the alphabet soup - get the main course with our consulting services!
wWorkflow.net or +1 416-809-1453

Questionhow to get XML file. Pin
AtulRane28-Aug-08 19:14
AtulRane28-Aug-08 19:14 
AnswerRe: how to get XML file. Pin
Russell Jones29-Aug-08 4:51
Russell Jones29-Aug-08 4:51 
AnswerRe: how to get XML file. Pin
Michael Dunn29-Aug-08 13:30
sitebuilderMichael Dunn29-Aug-08 13:30 
Question[Message Deleted] Pin
vankayalapati27-Aug-08 19:04
vankayalapati27-Aug-08 19:04 
AnswerRe: how to add event handling in xslt Pin
led mike28-Aug-08 5:11
led mike28-Aug-08 5:11 
QuestionReading values from unformatted xml Pin
indian14325-Aug-08 23:40
indian14325-Aug-08 23:40 
AnswerRe: Reading values from unformatted xml Pin
Christian Graus26-Aug-08 0:50
protectorChristian Graus26-Aug-08 0:50 
Questionxml to xml [modified] Pin
Member 470396625-Aug-08 5:16
Member 470396625-Aug-08 5:16 
AnswerRe: xml to xml Pin
led mike26-Aug-08 5:40
led mike26-Aug-08 5:40 
AnswerRe: xml to xml Pin
led mike27-Aug-08 6:25
led mike27-Aug-08 6:25 
QuestionXSL copy-of problem! Pin
Saul Johnson24-Aug-08 5:46
Saul Johnson24-Aug-08 5:46 
AnswerRe: XSL copy-of problem! Pin
Frank Horn25-Aug-08 8:11
Frank Horn25-Aug-08 8:11 
GeneralRe: XSL copy-of problem! Pin
Saul Johnson25-Aug-08 11:22
Saul Johnson25-Aug-08 11:22 
GeneralRe: XSL copy-of problem! Pin
Frank Horn25-Aug-08 21:10
Frank Horn25-Aug-08 21:10 
GeneralRe: XSL copy-of problem! Pin
Saul Johnson1-Sep-08 0:35
Saul Johnson1-Sep-08 0:35 
Questiontransform XML to XML Pin
StevenGoldberg23-Aug-08 11:56
StevenGoldberg23-Aug-08 11:56 
QuestionXSL value-of output problem! Pin
Saul Johnson22-Aug-08 8:24
Saul Johnson22-Aug-08 8:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.