Export (0) Print
Expand All
2 out of 2 rated this helpful - Rate this topic

Visual Studio .NET Schema Annotations

Visual Studio .NET 2003

To take advantage of special Visual Studio .NET IntelliSense statement completion and HTML/XML validation features, add vs:attribute="value" annotations to the element definitions in your custom markup language schema. For more information on annotated XML schemas, see Introduction to XML Schemas and Authoring and Using Custom Schemas Backgrounder.

The following vs: annotations are available. To jump to further information on any term, click its name:

vs:absolutepositioning, vs:blockformatted, vs:builder, vs:clientom,
vs:defaultnsprefix, vs:defaultnamespacequalifier, vs:defaultqualifier,
vs:deprecated, vs:empty, vs:friendlyname, vs:htmlequivalent,
vs:htmlflavor, vs:implicitclosure, vs:inputtype, vs:iscasesensitive,
vs:ishtmlschema, vs:mapstoname, vs:noambientcontentmodel,
vs:nonbrowseable, vs:omtype, vs:readonly, vs:requireattributequotes,
vs:requiredancestor, vs:standalone, vs:schemalist
vs:absolutepositioning
vs:absolutepositioning="true"

A Boolean value (TRUE or FALSE). Insert into the root <schema> element and set to TRUE to indicate that the HTML Designer can add absolution positioning style attributes to elements in the markup when the document is edited in Design view. Style attributes are used to position elements in Web browsers that support HTML 4.0 and later. In other browsers, tables are used for positioning.

For more information, see Positioning HTML Elements in Design View and Aligning and Layering HTML Elements in Design View.

vs:blockformatted
vs:blockformatted="true"

A Boolean value (TRUE or FALSE). Set to TRUE to enable the addition of initial white spaces during automatic formatting of XML element markup. The presence or absence of any initial or final white spaces within the markup is treated as insignificant. For example,

<asp:datalist>
<itemtemplate>  asfddfsa
</itemtemplate>
</asp:datalist>

is reformatted as follows:

         <asp:datalist>
            <itemtemplate>
               asfddfsa
            </itemtemplate>
         </asp:datalist>

This prevents entries in Active Server Pages (.asp) templates from being formatted in an XML-like manner.

vs:builder
vs:builder="style"

Insert into an attribute definition and set to "style", "url", or "color" to indicate that the attribute should bring up the specified type of builder when the single-completion option is invoked. A Builder button is displayed for this property in the Properties window.

vs:clientom (1)
vs:clientom="mylib.tlb"

Insert into the root <schema> element to provide the file name of a .tlb file located in the same folder as the schema document. The browser will search this type library for a description of the client object model to reference when providing IntelliSense statement completion in scripts. The three type libraries that are shipped with Visual Studio .NET can be referenced in new schemas. Advanced XML developers can also create custom type libraries as needed.

For more information, see Automation Clients: Using Type Libraries.

vs:clientom (2)
vs:clientom="anchor"

Insert into an element definition to attach scripting support to the element within the browser's document object model. Commonly references the element class in the type library named in the schema-level vs:clientom annotation.

In the case of <INPUT> elements, assign the special value vs:clientom="#type". The HTML parser will append the value of the type attribute of the <INPUT> element to the element name before validating. For example, if the HTML schema definition for an <input type="button"> element includes vs:clientom="#type", the HTML parser will search the specified type library for information on "inputbutton".

For more information, see Creating Scripts and Editing Event Handlers in HTML Designer, Creating Event Handlers in Web Forms Pages, HTML Tab, Toolbox and INPUT Element, input Object.

vs:defaultnsprefix
vs:defaultnsprefix="mynamespace"

Insert into the root <schema> element to specify (by means of xsd:any) the name of the parent namespace to be displayed with top-level elements in automatic statement completion windows.

vs:defaultnamespacequalifier
vs:defaultnamespacequalifier="mynsqualifier"

Insert into an element definition to provide a default xmlns prefix for the element if one is not mapped in the instance document.

vs:defaultqualifier
vs:defaultqualifier="mydefaultqualifier"

Insert into the root <schema> element to specify (by means of xsd:any) the name of the parent namespace for top-level elements to be displayed in automatic statement completion pop-ups. These pop-ups will show that the children of the <schema> element are at the top level of the specified namespace.

vs:deprecated
vs:deprecated="true"

A Boolean value (TRUE or FALSE). When set to TRUE, the item marked with this attribute isn't shown in the Properties window, does 'not show up in statement completion pop-ups, and is labeled as "deprecated" in markup validation messages.

vs:empty
vs:empty="true"

A Boolean value (TRUE or FALSE). When set to TRUE, the item marked with this attribute is inserted by statement completion pop-ups without an end tag, and markup validation messages will report an error if an end tag is inserted.

vs:friendlyname
vs:friendlyname="IE6"

Insert into the root <schema> element to provide a friendly name for the added schema in the instance document. This name will appear on the list of available targetSchema Property values displayed in the Properties Window and the General Tab, DOCUMENT Property Pages Dialog Box.

vs:htmlequivalent
vs:htmlequivalent="true"

Used in non-HTML schemas to give tags special HTML-like behavior. For example, the WSH schema specifies this attribute on its <SCRIPT> element, so that its contents can be parsed and interpreted like the equivalent HTML element.

vs:htmlflavor
vs:htmlflavor="4.0"

Insert into the root <schema> element to provide a numerical value (for example, 3.2 or 4.0) that defines which generation of HTML the target browser must support. Some features used in HTML markup (for example, CSS styles) require that the target browser support HTML 4.0.

For more information, see targetSchema Property and Setting the targetSchema Property of an HTML Document.
vs:implicitclosure
vs:implicitclosure="true"

A Boolean value (TRUE or FALSE). When set to TRUE, indicates that a subsequent tag of the same kind can implicitly close the specified element. This can be used, for example, to permit HTML <LI> elements without closing tags to be embedded within <OL> and <UL> list elements.

vs:inputtype
vs:inputtype="image"

Insert into attribute definitions within the <input> element definition to provide a space-delimited list of <input> element types for which the specified attribute should be shown in the Properties window. For example, the definition

<xsd:attribute name="value" vs:inputtype="button checkbox hidden password radio reset submit"> 

specifies that the value attribute be displayed in the Properties window for seven types of <input> elements, but not for type="file", "image", or "text".

For more information, see HTML Tab, Toolbox and INPUT Element, input Object.

vs:iscasesensitive
vs:iscasesensitive="true"

A Boolean value (TRUE or FALSE). When inserted into the root <schema> element and set to TRUE, stipulates that validation will be case-sensitive. If set to "FALSE", the current case Options for the HTML/XML and CSS text editors will be applied.

For more information, see Format, HTML/XML, Text Editor, Options Dialog Box, Format, CSS, Text Editor, Options Dialog Box, and Options that Affect Existing HTML, CSS, or XML Markup.

vs:ishtmlschema
vs:ishtmlschema="true"

A Boolean value (TRUE or FALSE). When inserted into the root <schema> element and set to TRUE, stipulates that the schema describes an HTML document. If set to FALSE, the schema describes an XML document.

vs:mapstoname
vs:mapstoname="attribute"

A literal string that aliases an attribute name. Should be used sparingly to deal with cases where IHTMLElement attribute names do not match the actual attribute name (for example className, which maps to the class attribute).

vs:noambientcontentmodel
vs:noambientcontentmodel="true"

A Boolean value (TRUE or FALSE). When set to TRUE, limits the number of choices available from statement completion pop-ups to children of the element.

For example, if this annotation is included in the schema definition for a <CALENDAR> element, and you embed a <CALENDAR> inside an .aspx form, you will see only children of the <CALENDAR> element in statement completion pop-ups. Typically, you would see children of the .aspx form as well. If you attempt to embed another child of the .aspx form inside the <CALENDAR> element, an HTML validation error is displayed.

vs:nonbrowseable
vs:nonbrowseable="true"

A Boolean value (TRUE or FALSE). When inserted into an attribute definition and set to TRUE, blocks that attribute from appearing in statement completion pop-ups, and to block validation of that attribute by the parser. This annotation can be added to the schema definition of an element to prevent the element from appearing in statement completion lists, and instead just show only its children.

For example, the <HEAD> element definition in the Internet Explorer 3.2 schema contains only a single child element, the <headcontent> element. However, statement completion pop-ups for the <HEAD> element in an HTML document display all children of the <headcontent> element.

vs:omtype
vs:omtype="event"

Insert into an attribute definition to mark the attribute as an event handler.

vs:readonly
runat vs:readonly="true"

A Boolean value (TRUE or FALSE). When inserted into an attribute definition and set to TRUE, specifies that the value of that attribute cannot be changed from the Properties window or Property Pages dialog boxes.

vs:requireattributequotes
vs:requireattributequotes="true"

A Boolean value (TRUE or FALSE). When inserted into the root <schema> element and set to TRUE, tells the HTML parser to report quotes missing around a value in an instance document.

vs:requiredancestor
vs:requiredancestor="true"

Used by validation and statement completion to specify that a certain element is valid so long as it has the specified ancestor, which need not be its direct parent. This permits validation of such cases as an HTML <input> element embedded within a <table> element, which itself is embedded within a <form> element:

<form>
   <table>
      <tr>
         <td>
            <input type="button">
         </td>
      </tr>
   </table>
</form>
vs:standalone
vs:standalone="true"

Used during automatic statement completion and markup validation to determine if a specified attribute need have any values associated with it.

vs:schemalist
vs:schemalist="schema1 schema2 schema3"

Used during automatic statement completion and markup validation to provide, at run time, values of certain properties based upon the schemas listed.

Note   Generally, you should not specify these values in the schema, because user schemas are not listed in the Properties window.

See Also

HTML and XML Schema Extensibility | Properties Window | General Tab, DOCUMENT Property Pages Dialog Box | Working With CSS Styles | Creating Scripts and Editing Event Handlers in HTML Designer | Previewing an HTML Page in a Web Browser | Web Browser, Environment, Options Dialog Box | HTML Tab, Toolbox | Working With CSS Styles

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.