Acknowledgement element with a required positive policyVersion. It describes contract data. An XSD does not install executable behavior or create a new Agent API operation.
1. Choose a namespace and version
Download Acknowledgement-v1.xsd. The file uses a reserved example address:targetNamespace, the contract element’s xmlns, and your local map.
2. Define the allowed XML
Acknowledgement element. Its policyVersion attribute is required and must be a positive integer. It permits neither child elements nor additional attributes.
elementFormDefault="qualified" places locally declared elements in this namespace. attributeFormDefault="unqualified" leaves ordinary attributes without a namespace. The XSD itself uses the standard XML Schema namespace, separate from your contract vocabulary.
For more complex structures, use xs:sequence for ordered children, minOccurs/maxOccurs for cardinality, and explicit types for values. Add xs:import when a dependency belongs to another namespace. Load that dependency in your local schema set too, so validation can resolve it offline.
3. Embed the element in a complete contract
Download custom-acknowledgement.xml. It extends the acknowledgement tutorial with custom machine-readable data:urn:nf:iot:leg:sc:1.0. Its human-readable terms also name policy version 1.
Complete custom-schema contract
Complete custom-schema contract
policyVersion is a static value in this template. Defining a contract parameter with the same name would not establish a substitution rule in your custom vocabulary. Use a documented parameter-reference mechanism in a supported instruction when a machine value must come from instance inputs.
4. Create a local schema set
Save the base dependencies from the validation guide and your custom XSD in a local directory. Add this association to your validator’s schema-set or catalog configuration:
Keep the eight base namespace associations as well. Load the resulting nine schemas and validate the complete
custom-acknowledgement.xml file. The custom XSD’s targetNamespace must exactly match the namespace of the embedded Acknowledgement element.
Expected result: the complete XML passes. Confirm that your validator also catches these changes, then restore the original document:
If your vocabulary imports more namespaces, add each dependency to the same schema set before validating. Retain the exact files and hashes with your contract revision.
5. Prepare provider schema resolution
The selected server implementation checks machine-content namespaces and their imports. It first looks for a stored schema; for an uncached namespace, its normal loader attempts to retrieve the schema using the namespace URI. A namespace that cannot be fetched can produceSchema not downloadable or Unable to get schema file.
Before submitting your template:
- Replace the example namespace with your controlled, versioned identifier in all three locations described above.
- Arrange an XSD location the provider can retrieve. For the normal URI-based loader, serve the XSD at the namespace URI with XML content, without an interactive login page.
- Make all imported namespace schemas available through the provider’s supported resolution method.
- Give the provider the exact namespace, schema bytes/hash, dependencies, complete contract, and intended data/behavior for review.
- Confirm the supported Neuron build resolves and validates the complete contract. Local success alone does not pass this step.
6. Submit and verify the template
After the provider confirms schema access and intended support, use the HTTP authoring workflow with your final custom contract file. Observe proposal validation, approval, instance creation, and signatures separately. Keep the exact XSD, namespace, dependency versions, approved template ID, and resulting contract IDs together. A changed schema can change which documents validate. Use a new versioned namespace for breaking changes and obtain a new template review when required. Provider resolution and the custom contract’s live lifecycle have not yet been verified for this example. The supplied tests prove local XML structure and rejection of invalid values only.Original references
- Neuro Foundation documentation: specifications and technical reference material.
- Script syntax and function reference: the full language reference.