XML and Related Technologies (1)[Author: Liao Jia sequence added time: 06:13:31]
XML has many related technologies. Only by combining these technologies can we make full use of the powerful functions of XML. These technologies include: xlink and xpointer (set the XML hyperlink), Dom (Document Object Model: file object model, access and operation file content), namespaces (to solve the problem that different elements have the same name), XHTML (next-generation html), and so on. ■ Xlink and xpointer In the XML specification, we can see that it does not specify the File Link issue. To enable XML files to have functions similar to HTML file hyperlinks, W3C has developed xlink and xpionter specifications, xlink specifies the link standards between XML files (similar to external links in HTML), and xpointer specifies the link standards between different locations in XML files (similar to internal links in HTML ). 1. xlink: the links set by xlink are simple link and extended link. The link function of simple link is basically the same as that of HTML hyperlinks, while extended link is beyond the HTML hyperlink function. It can set multiple linked objects at a time, the link is determined by multiple tags. When xlink is used in an XML file, the element must be declared in the DTD. The complete declaration sample is as follows (this sample declares an xlink element of the simple link type named simple ): <〈! Element simple any> 〉 <〈! ATTLIST simple XML: link CDATA # fixed "simple" Href CDATA # required Role CDATA # implied Title CDATA # implied Inline (true | false) "true" Content-role CDATA # implied Content-title CDATA # implied Show (embed | replace | new) # implied Actuate (Auto | user) # implied Behavior CDATA # implied> 〉 As you can see, the xlink element has multiple attributes. by assigning values to these attributes, You can compile a variety of link methods. The following describes these attributes. Edit recommendations ● CSS and XSL XML: Link: Specifies whether the link type is simple link or extended link. Href: used to set the link address, which is the same as the href attribute in the mark in HTML. Role: describes the link function and provides it to applications for reading. Title: describes the link function and provides it for users to read. It is similar to the alt attribute marked with a in HTML. Inline: it can be set to "true" or "false" to indicate whether the established link is embedded. The default value is "true ". Content-role and content-title: are similar to role and title, but they describe the content that points to, rather than the content of the link. Show: There are three values. Replace indicates that the content of the link replaces the current content, and new indicates that the content of the link is opened in a new window, embed indicates adding the link content to the current content. Actuate: sets how the link is activated. Auto indicates that the link is automatically activated after the XML file is interpreted. The user indicates that the link must be manually activated by the user, that is, the user must click the link with the mouse. Behavior: After the link is set to be activated, some actions are automatically triggered. You can use some commands to set what the application will do after the link is activated. |