Web Control Schema

M

Mythran

I am trying to create an XML schema file for my web control (the schema for
the HTML and Intellisense). So, I have a DataGridControl that derives from
DataGrid. I added 1 property named "Boo" (just for kicks). The control
works fine and dandy. Now, I create an xsd file named
DataGridControlSchema.xsd, with the following contents:

<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema
targetNamespace="MCIS.WebControls.DataGrid.Schema"
elementFormDefault="qualified"
xmlns="MCIS.WebControls.DataGrid.Schema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
vs:friendlyname="MCIS DataGridControl Schema"
vs:ishtmlschema="false"
vs:iscasesensitive="false"
vs:requireattributequotes="true">

<xsd:annotation>
<xsd:documentation>
DataGridControl Control schema
</xsd:documentation>
</xsd:annotation>

<xsd:element name="DataGridControl" type="DataGridControlDef" />

<xsd:complexType name="DataGridControlDef">
<xsd:attribute name="Boo" type="xsd:string" />
<xsd:attributeGroup ref="WebControlAttributes" />
</xsd:complexType>
</xsd:schema>


In my html, I modify the BODY tag to be:

<body xmlns:dg="MCIS.WebControls.DataGrid.Schema">

This works fine. I can see "dg:DataGridControl" in the intellisense, and
when I add:

<dg:DataGridControl

I can see the "Boo" property listed. But what I do not see is the
"WebControlAttributes" attributeGroup. These are defined in asp.xsd. So,
my question is, how can I successfully reference the attributes that are
defined in asp.xsd (default schema for asp prefixed items) in my control's
schema so I don't have to duplicate them?

Thanks in advance! :)

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top