Resolving Taxonomy Import Problems
After importing an XML taxonomy file, the Auto-Classify tool may only display the top level parent node in your cluster. The most common cause of this is that the child nodes of the parent node in the imported taxonomy are not structured uniformly (i.e., they do not have the same XML elements and attributes). By default, the Auto-classification tool will not parse taxonomy child nodes that do not contain the identical XML elements and attributes among all sibling nodes. For example, if your input taxonomy was the following:
<taxonomy> <entity> <label>Foo</label> <query>foo</query> <child> <label>Bar</label> <query>bar</query> <child> <label>Baz</label> <query>baz</query> </child> </child> </entity> </taxonomy>
You would set the connector XPaths to:
- XPath to each top-level entry: /taxonomy/entity
- Relative XPath to Category Label: label
- Relative XPath to Category Query: query
- Relative XPath to Nested Records: child
The output you receive would look like:
-
Foo
-
Bar
- Baz
-
Bar
However, the nested <entity> node in the following example would fail to parse, because Auto-Classify does not support different types of child elements:
<taxonomy> <entity> <label>Foo</label> <query>foo</query> <child> <label>Bar</label> <query>bar</query> <entity> <label>Baz</label> <query>baz</query> </entity> </child> </entity> </taxonomy>
If you have child nodes that have different elements and attributes than other sibling child nodes, you will need to do the following:
- In the auto-classify collection, go to ConfigurationBinning and edit the binning set with the XPath viv:if-else($id, $id, $query-path). Check the Disable Bin Pruning box. Now, after completing the rest of the configuration steps in this tutorial, your parent node and your child nodes should all be displayed in the expected binning clusters on the Sample Results page.