I have never used Schema before, this time I hope I can add Namespace, Schema, and then convert it to HTML with XSLT, I didn't expect many efforts. Now I record the normal results of the work, I hope to have some help.
Let's take a look at my XML file. Plan to define the menu of the web page.
XML Version = "1.0" encoding = "GB2312"?> menu_item> menu_items >
Very simple XML file, throw away the detour
XML Version = "1.0" encoding = "gb2312"?> xs: sequence> xs: complexType> XS: Element> xs: sequence> xs: ComplexType> xs: Element> xs: schema> where http://www.hz-sp.com/2005/xmlschema-meu is my namespace. Then use XML's Assign Schema function to specify this The root node MENU_ITEMS in XSD, XML is:
Next, create the XSLT file, only give the correct result:
XML Version = "1.0" encoding = "gb2312"?> >
xsl : for-each> tr> table> xsl: template> xsl: stylesheet> An annoyed is xpath-default-namespace = "http://www.hz-sp.com/ 2005 / xmlschema-menu "There is no effect on the Match of XSL: Template, and it is estimated that it is not XPath in Match. But this property doesn't work like SELECT in For-Each, which is quite strange, it is estimated that I have not understood how this property should be used.