Identifying Query for same XML but different attribute value and processing rule

Hi All,

I have a scenario where the same xml file based on an attribute value has to process two different processing rules.

The attribute can have multiple values. For example,

attribute = value 1 or value 2, execute processing rule 1
attribute = value 3 or value 4 or value 5, execute processing rule 2

We decided to treat the same XML as two different doc types based on the attribute value. Is this possible. I am trying to put regular expression in Identifying query. But looks like there are limitations in putting regex as well. I am trying different variations of [@attribute = ‘value 1’ | ‘value 2’] and every time I am getting a null pointer exception.

Is there a way to have an “or” condition for document type recognition or even processing rule?

Thanks and regards

If you are talking about TN doc type def,
try to use:
…[@attribute $eq$ ‘value 1’)]

Thanks Tong,

I am talking about TN DocTYpe def.

I tried the following query, but I am getting a null pointer exception:

Query = /ApplicationBatch[0]/Application[0][@TransactionType = ‘Estimate’]
Value = blank

Also, I want an or statement. Something like this:

/ApplicationBatch[0]/Application[0][@TransactionType = (‘Estimate’|‘Quote’)]

Seems like as soon as I put Square brackets or the $ sign, this breaks.

Using 9.5

Ninad Patil

hi ninad,

did you find the solution for this issue.

if yes, please share with us

thanks and regards,

While trying the query in an OR condition like
/purchaseorder[@purchaseordertype=‘A’ or @purchaseordertype=‘A’], Im able to save the doctype, but when the transaction comes into TN, it fails to identify the document and gets ignored as a result. Any workaround for this?

I think, the identifying query of the TN document type can accept only one value at a time (Regex might work, but not sure). Here we can find out one approach as below.

Define the multiple TN document types with the same root node and other extraction quries( differentiate the identifying queries for each document type).

Create a processing rule and select the TN document types which are required for this rule (select only the identifying query values matches with the requirement).

Create another processing rule for other values. :slight_smile:

I think you can resolve your issue using only one TN document type by defining a custom document attribute for the value you want to use for processing rule detemination and then configuring the TN document type to extract this attribute. Lastly you configure two processing rules that handle the same TN document type, using the custom document attribute to determine which rule to select. This selection is defined via the Processing Rule Extended Criteria tab.