...
Info |
---|
Alternatively, you can use the specification that you upload to create an API. |
Policy Execution Order
This XML DTD Validator policy executes after the request has been authenticated. You can use both the XML DTD and XML XSD policies concurrently as long as the schemas do not conflict.
Policy Settings
Info |
---|
Expression Enabled Fields in API Policies All expression enabled fields take expressions from the SnapLogic Expression Language and the API Policy Manager functions. |
Parameter Name | Description | Default Value | Example | ||
---|---|---|---|---|---|
Label | Required. The name for the API policy. | XML DTD Validator | DTD Validator | ||
When this policy should be applied | An expression enabled field that determines the condition to be fulfilled for the API policy to execute. For example, if the value in this field is request.method == "POST", the API policy is executed only if the request method is a POST. | True | request.method == "POST" | ||
Edit DTD | Launches the XML editor which allows you to define XML. The editor loads an existing XML document if defined previously. The editor lets you save XML in SnapLogic's file system or import existing XML documents from it. | Empty XML file |
| ||
Hide/Render WhiteSpace: Formats XML with watermarked dots or plain white space between the characters. | |||||
Format Code: Formats text in XML | |||||
Status | Indicates whether the API policy is enabled or disabled. | Enabled | Disabled |
Usage Guidelines
Support for inline declared definitions
You can enter a schema by clicking Edit DTD to open the XML editor. If the editor is empty, the policy will evaluate the Document Type Definitions declared inline, as shown in the following example:
Code Block |
---|
<?xml version="1.0"?> <!DOCTYPE books [ <!ELEMENT books (book+)> <!ELEMENT book (author, title, genre, price, pub_date, review+)> <!ATTLIST book id CDATA #REQUIRED> <!ELEMENT author (#PCDATA)> <!ELEMENT title (#PCDATA)> <!ELEMENT genre (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ELEMENT pub_date (#PCDATA)> <!ELEMENT review (#PCDATA)> ]> <books> <book id="bk001"> <author>Famous Author</author> <title>Computer Science</title> <genre>Education</genre> <price>100.00</price> <pub_date>2000-10-01</pub_date> <review>Test Review</review> </book> </books> |
DTD Guidelines
The following guidelines apply DTD schemas entered into the editor and their HTTP clients making the request:
...