Processing predicates of BT-761-Lot and BT-771-Lot #942
-
Hi, We encountered a scenario where our visual model (of noticeType - 17) contained the fields BT-761-Lot and BT-771-Lot. BT-771-Lot : "/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='Lot']/cac:TenderingTerms/cac:TendererQualificationRequest[not(cbc:CompanyLegalFormCode)]/cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listname='missing-info-submission']/cbc:TendererRequirementTypeCode" Our code generated the below xml as it was unaware of the predicates:
The xml which it should have generated (as we figured) was :
Can you suggest guidelines for dealing with predicates or any algorithm to determine when to create new elements(cac:TendererQualificationRequest) and when to override existing ones? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hello,
It seems you are using xpath to generate the XML, as you have seen, using xpath and ignoring predicates leads to problems.
As you can see while both fields "BT-761-Lot" and "BT-771-Lot" use the XML element "cac:TendererQualificationRequest", So for everything under a repeatable node (repeatable true), something like "ND-Lot" in our example, you could start by creating the XML element of a field and then build the parent (container) XML elements around it until you reach their repeatable parent node (container). For example: This will not be valid in terms of the schema, but you can ignore validation and use it to debug or during generation before validation, just an idea. |
Beta Was this translation helpful? Give feedback.
-
Didn't expect this ellaborate explanation , really appreciate it. This helps. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @rouschr , sorry for hijacking this old thread but we wanted to discuss a similar issue. We followed the idea of considering predicates while building xml document from the xpaths. But this isn't working for us in one particular scenario where we have both BT-10-Procedure-Buyer and BT-610-Procedure-Buyer. They have the following relative xpaths If you see cac:ContractingActivity doesn't really have any differentiating predicates for the above 2 fields and neither the 2 fields have different parent nodes. Because of this incorrect xml is being generated.
can you give some suggestion to handle this ? |
Beta Was this translation helpful? Give feedback.
Hello,
It seems you are using xpath to generate the XML, as you have seen, using xpath and ignoring predicates leads to problems.
To solve these problems we a…