I am attempting to undo the mess that the MicroSoft and its newsreader
created
in the posting.
"Martin Honnen" <ma*******@yahoo.dewrote in message
news:45**********************@newsspool3.arcor-online.net...
>C.W.Holeman II wrote:
>><emle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="noNamespaceSchemaLocation
http://emle.sourceforge.net/emle020000/emle.xsd">
This either needs to be
xsi:schemaLocation="http://emle.sourceforge.net
http://emle.sourceforge.net/emle020000/emle.xsd"
or
xsi:noNamespaceSchemaLocation="http://emle.sourceforge.net/emle020000/emle.xsd"
In your schema you need to decide what you want to do,
if you want to define elements in the namespace
http://emle.sourceforge.net/emle020000/emle.xsd, then you need to add
elementFormDefault="qualified"
as an attribute on xsd:schema.
If you want to define elements in no namespace then remove the
targetNamespace attribute.
I want to specify what elements are allowed and to constrain them as
defined in .xsd file. Also, I want to not use namespace prefixes at this
time. So, this is what I am trying:
In
http://emle.sourceforge.net/emle0200..._003_testb.xml :
xsi:noNamespaceSchemaLocation=http://emle.sourceforge.net/emle020000/emle_testb.xsd
In
http://emle.sourceforge.net/emle020000/emle_testb.xsd :
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://emle.sourceforge.net">
I get the same clean results as before.
Then I again change the main element name from "emle" to "emelxxx" in the
.xsd file to force whatever kind of error will happen when the elements in
my
.xml do not match the ones defined in the .xsd file. I expect there to be
some difference but see no change in behavior.
http://emle.sourceforge.net/emle0200...03_testxxx.xml http://emle.sourceforge.net/emle020000/emle_testxxx.xsd
Below the .xml and .xsd file contents have been added:
http://emle.sourceforge.net/emle0200...003_testb.xml:
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl"
href="http://emle.sourceforge.net/emle020000/emle_lab.xsl"?>
<emle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://emle.sourceforge.net/emle020000/emle_testb.xsd">
<emleLab emleLNum="3">
<emleLTitle>Rectangle/Fraction (XSLT)</emleLTitle>
<emleEquipment>
<emleETitle>Left Rectangle</emleETitle>
<emleEServer emleESType="EMLE_EST_RECTANGLE" emleWidth="601"
emleHeight="101" />
<emleEControl emleECEnable="properP1Fraction">
<emleECNumerator emleECMin="2" emleECMax="4" emleECStyle="radio"
emleECOrder="ascendingByComponent" />
<emleECDenominator emleECMin="2" emleECMax="4"
emleECStyle="radio" emleECOrder="ascendingByComponent" />
</emleEControl>
</emleEquipment>
<emleEquipment>
<emleETitle>Right Rectangle</emleETitle>
<emleEServer emleESType="EMLE_EST_RECTANGLE" emleWidth="601"
emleHeight="101" />
<emleEControl emleECEnable="properP1Fraction">
<emleECNumerator emleECMin="1" emleECMax="9" emleECStyle="radio"
emleECOrder="ascendingByComponent" />
<emleECDenominator emleECMin="1" emleECMax="9"
emleECStyle="radio" emleECOrder="ascendingByComponent" />
</emleEControl>
</emleEquipment>
<emleLDoc>This is the textual content of the lab "Rectangle/Fraction
(XSLT Test Case)".</emleLDoc>
</emleLab>
</emle>
http://emle.sourceforge.net/emle020000/emle_testb.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://emle.sourceforge.net">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Electronic Mathematics Labatory Equipment schema for
emle.sourceforge.net.
Copyright 2006.
http://emle.sourceforge.net/use.shtml All rights
reserved.
</xsd:documentation>
</xsd:annotation>
<xsd:element name="emle" type="EmleEmleType"/>
<xsd:complexType name="EmleEmleType">
<xsd:sequence>
<xsd:element name="emleLab" type="EmleLabType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EmleLabType">
<xsd:attribute name="emleLNum" type="xsd:positiveInteger"/>
<xsd:sequence>
<xsd:element name="emlsLTitle" type="xsd:string"/>
<xsd:element name="emleEquipment" type="EmleEquipmentType"/>
<xsd:element name="emleLDoc" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EmleEquipmentType">
<xsd:sequence>
<xsd:element name="emleETitle" type="xsd:string"/>
<xsd:element name="emleEServer" type="EmleEServerType"/>
<xsd:element name="emleEControl" type="EmleEControlType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="EmleEServerType">
<xsd:attribute name="emleESType" type="EmleESTypeType"/>
<xsd:attribute name="emleWidth" type="xsd:positiveInteger"/>
<xsd:attribute name="emleHeight" type="xsd:positiveInteger"/>
</xsd:complexType>
<xsd:simpleType name="EmleESTypeType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="EMLE_EST_RECTANGLE"/>
<xsd:enumeration value="EMLE_EST_PIE"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="EmleEControlType">
<xsd:attribute name="emleECEnable" type="EmleECEnableType"/>
<xsd:sequence>
<xsd:element name="emleECNumerator" type="EmleECWidgetType"
minOccurs="0"/>
<xsd:element name="emleECDenominator" type="EmleECWidgetType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="EmleECEnableType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="properFraction"/>
<xsd:enumeration value="properP1Fraction"/>
<xsd:enumeration value="improperFraction"/>
<xsd:enumeration value="mixedFraction"/>
<xsd:enumeration value="wholeNumber"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
--
C.W.Holeman II |
cw***@Julian5Locals.com -5 |
http://JulianLocals.com/cwhii
To only a fraction of the human race does God give the privilege of
earning one's bread doing what one would have gladly pursued free, for
passion. I am very thankful. The Mythical Man-Month Epilogue/F.P.Brooks