| Author |
How to use elementFormDefault and attributeFormDefault?
|
Jayadev Pulaparty
Ranch Hand
Joined: Mar 25, 2002
Posts: 645
|
|
|
Thanks Balaji for the explanation. Got it. Expected the xslt processor to be little more smart by looking at the associated schemas
|
 |
Dan Drillich
Ranch Hand
Joined: Jul 09, 2001
Posts: 1121
|
|
Jayadev, I changed Pentax.xsd to be - You said -
If they lose their original namespace (and hence no more guided by their respective schema), why is the schema validator complaining when i add an extra element <jaya/> (as i mentioned in a earlier posting today on this thread) to one of the individual schemas??
In my case, XML Spy doesn't complain about anything. Am I missing something? Dan
|
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
|
 |
Jayadev Pulaparty
Ranch Hand
Joined: Mar 25, 2002
Posts: 645
|
|
Dan, You have <xsd:element name="manual_adapter" type="pentax:manual_adapter_type"/> in Camera.xsd and <manual_adapter> <speed>1/10,000 sec to 100 sec</speed> </manual_adapter> in Camera.xml Now, if you would like to verify that <speed> element in Camera.xml still respects the schema Pentax.xsd, you need to add something like shown below in Pentax.xsd - <xsd:complexType name="manual_adapter_type"> <xsd:sequence> <xsd:element name="speed" type="xsd:string"/> <xsd:element name="jaya" type="xsd:string"/> </xsd:sequence> </xsd:complexType> The point here is that since you are referring to the pentax:manual_adapter_type in your Camera schema, you need to make changes to that complex type to see that the final xml document still respects the format laid out in the respective individual schema. The above mentioned combination of xml doc and schema would definitely produce an error by the schema validator
|
 |
 |
|
|
subject: How to use elementFormDefault and attributeFormDefault?
|
|
|