In Automation Engine 14.0, two new SmartName types were introduced namely XPath Query SmartName and XMP XPath Query SmartName. These new SmartName types replace the existing XPath SmartName and XMP XPath SmartName type. XPath or XMP XPath SmartNames which were defined in versions older than Automation Engine 14.0 are untouched after the upgrade to Automation Engine 14.0 and will continue to work, but you will no longer be able to create new SmartNames of type XPath or XMP XPath. You are encouraged to migrate to the new XPath Query type and XMP XPath Query type.
New SmartName types were introduced because the existing ones were no longer adequate for some new use cases in the area of business system integration:
Defining an XPath SmartName which returns an XML Element was not possible. The existing XPath type returned the concatenation of all child text nodes instead.
Defining an XPath SmartName using namespace prefixes was not possible. This was expected to work by advanced users.
Modify XPath Expressions selecting text
The existing XPath and XMP XPath SmartName type returned the XSLT-compatible text representation of the selected nodes, i.e. all text node values are concatenated, while the XPath and XMP XPath Query SmartName type returns the XML representation of the selected nodes. This is considered more useful in XML based workflows.
When the text value is wanted, you can explicitly ask for it, for example using the XPath expression "/doc/par/elem/text()" or using "string(/doc/par)"
Modify XPath Expressions for XML Namespaces
XPath SmartNames whereby the XML input contains no XML Namespace declarations can be easily converted into an XPath Query SmartName. No changes need to be done to the XPath Expression.
XPath SmartNames whereby the XML input contains a default XML Namespace declaration (e.g a JDF file) with no prefix need to be adapted when converted into an XPath Query SmartName, i.e. an empty prefix need to be added in the XPath Expression as shown in the example below or use the local-name function.
XPath SmartNames whereby the XML input contains an explicit XML Namespace declaration, i.e. with a prefix, need to be adapted when converted into an XPath Query SmartName, i.e. the namespace prefix needs to be added in the XPath Expression as shown in the example below or use the local-name function.
XMP sections declare namespace prefixes and namespaces. Consequently, XMP XPath SmartNames need to be adapted when you want to convert them into an XMP XPath Query SmartName, i.e. the namespace prefixes need to be added to the XPath Expression or the local-name function needs to be used.