In this step you are going to create two XML Schema filea: HelloXSLTIncoming.xsd as a basis for the incoming message, and HelloXSLTOutgoing.xsd as a basis for the outgoing message.
In the Projects window, right-click the HelloXSLTransformation > Transformation Files node and choose New > XML Schema.
In the File Name field, type HelloXSLTIncoming.
Click Finish. A new node—HelloXSLTIncoming.xsd —appears under the Transformation Files node in your HelloXSLTransformation project and the new Schema opens in the XML Schema Editor.
In the first column of the Schema view, right-click Elements and choose Add Element from the pop-up menu. The Add Element dialog box opens.
In the Name field, type name.
Under Type, select the Use Existing Type radio button.
Expand the Built-in Types node and select string, and click OK.
To view the source of the Schema you created, click the Source button on the XML Schema Editor toolbar. You should see the following code:
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.netbeans.org/schema/HelloXSLTIncoming" xmlns:tns="http://xml.netbeans.org/schema/HelloXSLTIncoming" elementFormDefault="qualified"> <xsd:element name="name" type="xsd:string"></xsd:element> </xsd:schema> |
In the Projects window, right-click the HelloXSLTransformation > Transformation Files node and choose New > XML Schema.
In the File Name field, type HelloXSLTOutgoing.
Click Finish. A new node—HelloXSLTOutgoing.xsd —appears under the Transformation Files node in your HelloXSLTransformation project and the new Schema opens in the XML Schema Editor.
In the first column of the Schema view, right-click Elements and choose Add Element from the pop-up menu. The Element dialog box opens.
In the Name field, type greeting.
Under Type, select the Use Existing Type radio button.
Expand the Built-in Types node, select string and click OK.
To view the source of the Schema you created, click the Source button on the XML Schema Editor toolbar. You should see the following code:
<?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.netbeans.org/schema/HelloXSLTOutgoing" xmlns:tns="http://xml.netbeans.org/schema/HelloXSLTOutgoing" elementFormDefault="qualified"> <xsd:element name="greeting" type="xsd:string"></xsd:element> </xsd:schema> |
Click the Save All button on the toolbar.
You should see two Schema files listed under the Transformation Files node in your HelloXSLTransformation project.