Dear George,
It still didn't work out for me.
When the cursor gets into the Customer Node it sets the security to
everyone, as expected, but when you press the 'backspace' after you deleted
the text inside the node, it selects the xml-tag itself and thén, when you
press the 'backspace' again it removes the xml-tag from the document.
Could the problem depends on my xml-nodes?
The scheme is attached to the template.
I am developing this all in VSTO2005
The customer node is build as following;
<Customer>
<Company></Company>
<Salutation></Salutation> <FirstName></FirstName> <LastName></LastName>
</Customer>
<CustomerAddress>
<Street></Street>
<PostalCode></PostalCode> <Place></Place>
<Country></Country>
</CustomerAddress>
Below is the scheme of the document;
Code:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="XSDSchema1"
targetNamespace="http://tempuri.org/XSDSchema1.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/XSDSchema1.xsd"
xmlns:mstns="http://tempuri.org/XSDSchema1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Customer" type="CustomerType" />
<xs:element name="Customer_Address" type="CustomerAddressType" />
<xs:element name="FrontPageImage" type="xs:base64Binary"
xmime:expectedContentType="image/gif"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime" />
<xs:element name="Employee" type="EmployeeType" />
<xs:element name="Index" type="xs:string" />
<xs:element name="FrontLetter" type="xs:string" />
<xs:element name="Content" type="xs:string" />
<xs:complexType name="CustomerType">
<xs:sequence>
<xs:element name="Company" type="xs:string" minOccurs="1"
maxOccurs="unbounded" />
<xs:element name="Salutation" type="xs:string" minOccurs="1"
maxOccurs="1" />
<xs:element name="Firstname" type="xs:string" minOccurs="1"
maxOccurs="1" />
<xs:element name="Lastname" type="xs:string" minOccurs="1"
maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="CustomerAddressType" mixed="true">
<xs:sequence>
<xs:element name="Street" type="xs:string" minOccurs="1" maxOccurs="1"
/>
<xs:element name="Postalcode" type="xs:string" minOccurs="1"
maxOccurs="1" />
<xs:element name="Place" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Country" type="xs:string" minOccurs="0"
maxOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="BEaddress" mixed="true">
<xs:complexContent>
<xs:extension base="CustomerAddressType">
<xs:sequence>
<xs:element name="zipcode" type="xs:positiveInteger"/>
<xs:element name="Place" type="xs:string" minOccurs="1"
maxOccurs="1" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="UKaddress" mixed="true">
<xs:complexContent>
<xs:extension base="CustomerAddressType">
<xs:sequence>
<xs:element name="zipcode" type="xs:positiveInteger"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="NLaddress" mixed="true">
<xs:complexContent>
<xs:extension base="CustomerAddressType">
<xs:sequence>
<xs:element name="zipcode" type="xs:positiveInteger" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="EmployeeType">
<xs:sequence>
<xs:element name="Name" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Email" type="xs:string" minOccurs="1" maxOccurs="1" />
<xs:element name="Telephone" type="xs:string" minOccurs="1"
maxOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:schema>