Docentric Toolkit 3.0 is out
We are pleased to announce a new release of Docentric Toolkit that we were working on for the last several months. While versions 2.X were mostly addressing PDF and XPS output capabilities, this version makes significant improvements in our template designer – Docentric Toolkit Add-In for MS Word.
We have received several complaints about the existing Binding Control in the Add-In for MS Word. Binding Control is handy when the binding path is a simple XPath expression that can be auto-created by simply picking a correct XML node from the schema in the Binding Control.
While this might be sufficient in most cases, more complex XPath expressions sometimes need to be written manually. So far, it has been possible to manually write XPath into the Path field of Binding Control, but doing so was tedious and cumbersome. This is why we have created an XPath Editor that you can bring up from within Binding Control whenever you need to write an expression by hand.
The editor will help you build XPath expressions by evaluating and validating them on-the-fly, as you type. The resulting XML nodes are shown at the bottom whenever an expression is syntactically correct and valid according to the imported XML schema. Otherwise, a detailed error is displayed. This way you will always know what the result of a binding will be.
The editor also displays a list of all XPath functions and operators at your disposal when writing XPath expressions.
Improved XPath Support
So far XPath 1.0 has basically been fully supported. Users were able to write any XPath expression to define an XML data binding. Still, in certain cases XPath was not powerful enough and this release addresses these issues.
Limited XML node selections
Prior to this release, selecting an ancestor of the context XML node (binding source) was not possible due to the internal workings of Docentric Toolkit’s data binding mechanisms. You were not able to use operators ‘
/‘ or certain axes to select ancestor nodes. The following XPath expressions, for example, did not work:
This issue has now been fixed and all the operators work as expected.
XPath by itself is powerful enough to define various calculations and filters, and perform at least basic data shaping. What it lacks are functions, in particular string manipulation functions. We have completely re-implemented the XPath evaluation engine in Docentric Toolkit to address this issue. The new engine is extensible and allows for adding new functions in addition to the built-in ones as needed. We have already added several functions that you requested or we deemed were missing from the standard set.
The functions added so far include:
iif– Inline IF. Returns the second argument if the first one equals True, otherwise it returns the third argument.
current– Returns the current XML node. This is different than the context node. This function always returns the Binding Source XML node.
data-source– Returns the root node of the specified data source. This function is a means of cross-referencing multiple XML data sources inside a single XPath expression.
string-join– Concatenates strings of the give node-set into a single string delimited by the specified character. This function also alows you to specify an optional delimiting character for the last string in order to get the result in the following form: String One, String Two and String Three.
lower-case– Lower-cases the given string.
upper-case– Upper-cases the given string.
replace– Returns a string that is a result of a replacement operation of the specified string by using a regular expression and a replacement string
This is just the initial set of additonal functions. We will be gradually adding new XPath functions. You are most welcome to tell us what function you are missing and would like them to be included in the next release.
The Add-In for MS Word is now finally available with the Preview function, which will allow you to generate a document directly from the Add-In.
You can now, in addition to an XML schema, optionally set sample XML data that is used to populate a template, each time you run the Preview. Note that when you specify an XML to infer the schema from for a data source, the same XML will be used as a sample XML for previewing.
This functionality is currently available for templates with XML data sources only. We will wait for your feedbacks first before implementing Preview for templates with .NET Object data sources.
There is another sub-feature we have added: a built-in XML editor that you can use to edit a preview sample XML on-the-fly or create a new XML document from scratch. If you need to quickly change the values in a sample XML, you can now simply edit a sample XML inside the Add-In, without doing it in an external XML editor and reloading it back into the template. When the XML editor shows up, the specified XML schema is attached to the edited XML file. This means that full intellisense and validation will be available as long as the XML schema is specified.
End User Mode
The first version of Docentric Toolkit released years ago, targeted developers. However, we soon realized that the Add-In was friendly enough for non-developers and that they were using it too. We have been improving user experience ever since in order to bring the toolkit even closer to the template designers (users) who are not programmers nor are they familliar with software development concepts. Today we know that there are many non-developers designing templates with Docentric Toolkit Add-In for MS Word.
There is a new End User Mode button on the Docentric Toolkit MS Word ribbon tab.
It is our latest effort to bring the Add-In even closer to non-developers. This new button hides some technical details when they are not necessary. It is a toggle button and it affects how schema trees in the Add-In are displayed when using .NET Object or XML data sources. By turning on End User Mode, views of schema trees change:
The fact is that non-technical designers do not care about specific number types (e.g. double, integer, decimal,…) and they do not want to be puzzled by concepts like fields and properties or XML elements and attributes. The new End User Mode now hides all these needless technical details, which makes data schemas easier to read and understand.
Labels are another small feature that targets non-developer users. It will allow you to attach “user-friendly names” to XML schema elements and attributes. Sometimes XML schemas contain XML nodes with names that are not meaningful enough to the user designing templates. In such cases labels can be attached to XML nodes which (labels) show up for XML nodes in a schema tree as a tooltip. For example, you can add label Request for quotation ID to the attribute RFK_ID.
In order to add a label to an XML schema element or attribute, simply use XML schema annotations with our XSD extension <xse:label> element:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xse="http://schemas.docentric.com/xml-schema-extensions">
<xse:label xse:text="Report data" />
PDF output improvements and bug fixes
In addition to all these new features, we also fixed most of the identified bugs and made improvements to PDF and XPS rendering. Even if you think you won’t benefit from the new features the release brings, we recommend you to consider switching to Docentric Toolkit 3.0.
Like always, any comments will be of great value to us. So, try out the newest release and don’t forget to tell us what you think.