Examples of XML, Schema and XSLT at the same time

xiaoxiao2021-03-06  41

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.

Very simple XML file, throw away the detour

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:

>

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.

转载请注明原文地址:https://www.9cbs.com/read-51751.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.033, SQL: 9