This is an updated XSD that will work:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://me.com/ns" targetNamespace="http://me.com/ns" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<xs:annotation>
<xs:appinfo>
<sch:ns uri="http://me.com/ns" prefix="q"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="socket">
<xs:annotation>
<xs:appinfo>
<sch:pattern name="Mutually exclusive attributes on the socket element" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<sch:rule context="q:socket">
<sch:assert test="@hostName and @hostAddress">On a socket element only one
of the attributes hostName and hostAddress are allowed, not
both.</sch:assert>
</sch:rule>
</sch:pattern>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="hostName" type="xs:string" use="optional"/>
<xs:attribute name="hostAddress" type="xs:string" use="optional"/>
</xs:complexType>
</xs:element>
</xs:schema>
Schematron requires namespace prefix declarations as indicated above.