摘要:
Described is a method and data structure that enables an object to be specified declaratively within a markup document. The markup document may be XML-based. In accordance with the invention, the object is written based on a mapping. The mapping includes a URL attribute for defining a location for a definition file having assemblies and namespaces where classes are specified. The class name is mapped to the markup document as a tag name. Properties and events of a class are mapped to attributes of the tag associated with the class. The method further includes a method to parse the markup language to create a hierarchy of objects. Attributes that do not map directly to a class are defined with a definition tag. The definition tag is also used to add programming code to a page.
摘要:
Described is a method and data structure that enables an object to be specified declaratively within a markup document. The markup document may be XML-based. In accordance with the invention, the object is written based on a mapping. The mapping includes a URL attribute for defining a location for a definition file having assemblies and namespaces where classes are specified. The class name is mapped to the markup document as a tag name. Properties and events of a class are mapped to attributes of the tag associated with the class. The method further includes a method to parse the markup language to create a hierarchy of objects. Attributes that do not map directly to a class are defined with a definition tag. The definition tag is also used to add programming code to a page.
摘要:
A new form of DHTML behaviors, called ˜Element Behaviors,” wherein a behavior component is bound to an HTML element, and not just attached to the element as with attached behaviors. A special processing instruction is used to import the Element Behavior into a Web page. Upon parsing the Web page, the Element Behavior is initialized as soon as it has been downloaded and parsed. This immediate initialization makes the Element Behavior declaratively available to bind synchronously to the element(s) it is modifying. A viewLink is a feature of Element Behaviors that permits encapsulation of a behavior component file (e.g., an HTC file) so that the structure of the HTC file is transparent to a Web page (˜primary document”) to which the HTC file is linked, but the content of the HTC file may be displayed in the primary document. The viewLink provides a pointer to the content in the encapsulated HTC file, and renders that content in the primary document, without incorporating the elements of the encapsulated HTC file into the primary document structure.
摘要:
A programming interface provides functions for generating applications, documents, media presentations and other content. These functions allow developers to obtain services from an operating system, object model service, or other system or service.
摘要:
The present invention is directed to a method and system for compiling a markup language file into an executable application or library dll. The system may also compile a code-behind file associated with the markup language file. The compiling system may include a parser for parsing the markup language file and providing the compiling system with detailed token information to the compiling system. This token information could be user code snippets or non-code token information such as tags, properties or events in the markup. The compiling system may also include a binary file generator for generating a binary file from the non-code token information, wherein the binary file contains one record for each non-code token. Additionally, the system may include a code generator for generating a language-independent tree of code expressions based on the token information, wherein the code expressions represent the markup language file as a class. A compiler may compile the binary files and code files to create an executable application.
摘要:
Described is a system and method for declaring a resource element in markup that is intended to be instantiated lazily only upon use at run-time rather than always at markup load time. In one embodiment, the invention provides a parent resources tag that encloses resource elements that may be any type of markup element. On compile, a specially prepared compiler/parser identifies the Resource tag and creates definitional information sufficient to describe the resource elements in such a manner that the resource elements are defined but not created at run-time when the markup is first loaded, and are created only upon use at run-time. A resource may be defined to be shared or non-shared. If shared, the resource is instantiated only once and that same instance is handed out each time the resource is accessed. If non-shared, a new instance of the resource is always created and handed out on each access of the resource.
摘要:
Described is a system, method, and data structure that enables an executable assembly associated with a subclass to be generated from a subclass definition within a markup document. In accordance with the invention, the subclass definition is written based on a schema. The schema may be XML-based. The schema includes a subclass tag for defining a name for the subclass. The name is associated with a type for an object that is instantiated when the executable assembly executes. The schema further includes one or more hints, such as for specifying a programming language to compile the subclass definition, for specifying a superclass from which the subclass derives, for specifying actions to perform when the object becomes instantiated, for creating an event definition and event handler for the subclass, and for specifying a property that becomes a member within the object when the object is instantiated.
摘要:
Methods and systems for preserving unknown markup in a strongly typed environment are described. In but one embodiment, XML-based markup that may contain XML-based elements that are both known and unknown is received. A strongly typed tree that is associated with the known XML-based elements is instantiated and a weakly typed tree that is associated with both the XML-based known and unknown elements is instantiated. The strongly and the weakly typed trees are then correlated in a manner that preserves the unknown XML-based elements.
摘要:
A method and system for mapping a tag in a markup language (ML) document to a class using namespaces is described. A parser in a computing system analyzes the tag in the ML document. A definition file location attribute related to the tag is referenced in the ML document. A definition file associated with definition file location attribute is retrieved. A namespace related to the tag is referenced within the definition file to determine the class associated with the tag. The class is located in an assembly such that the tag is mapped to the class.
摘要:
A new form of DHTML behaviors, called ˜Element Behaviors,” wherein a behavior component is bound to an HTML element, and not just attached to the element as with attached behaviors. A special processing instruction is used to import the Element Behavior into a Web page. Upon parsing the Web page, the Element Behavior is initialized as soon as it has been downloaded and parsed. This immediate initialization makes the Element Behavior declaratively available to bind synchronously to the element(s) it is modifying. A viewLink is a feature of Element Behaviors that permits encapsulation of a behavior component file (e.g., an HTC file) so that the structure of the HTC file is transparent to a Web page (˜primary document”) to which the HTC file is linked, but the content of the HTC file may be displayed in the primary document. The viewLink provides a pointer to the content in the encapsulated HTC file, and renders that content in the primary document, without incorporating the elements of the encapsulated HTC file into the primary document structure.