I have an xsd file projectName/Resources/Schema.xsd (namespace http://www.mycompany.com/SomeSchema) for translation but need to set an element name dynamically. For Static option I may manually select an element (btw Types are not displayed), say named someElement1, then 2 elements are added to nxsdTranslation:
<con3:nxsd ref="projectName/Resources/Schema"/>
<con3:schemaElement xmlns:ns="http://www.mycompany.com/SomeSchema">ns:someElement1</con3:schemaElement>
When I select Dynamic and choose XQuery Expression, I'm allowed to enter any xquery element expression but I didn't find any information, what should be specified there. I tried several guesses, but each time received an error
XML to Native nXSD translation failed for the nXSD : null
Does anybody know what exactly should be returned by Dynamic nXSD Schema?
The XQuery for dynamic NXSD translation is similart to dynamic validation:
where $schemaPath - absolute path to the xsd file, without .xsd extension, like my-project/Resources/my-schema
$elementNamespace and $elementName - element namespace and local name
xquery root element name (i.e. translate in this example) doesn't matter at all