UnknownAttribute event for LxSerializer - liquid-xml

Does there exist in LxSerializer something along the lines of the XmlSerializer UnknownAttribute event?
Liquid did a much better job parsing the xsd into c# code than xsd.exe did, but I need to be able to handle attributes that are not defined in the XSD. Any suggestions?

Yes, please see the Liquid XML Objects documentation regarding Unexpected Elements and Attributes
If 'Handle unknown nodes' option is true, any unexpected elements and attributes will be processed and added to a generic list of XElements and XAttributes.
If 'Handle unknown nodes' option is false, any unexpected elements and attributes will cause the error handler to be invoked.

Related

React hook form dynamic fields validations

My task is to implant a functionality that includes dynamically creation of fields and apply validation on those dynamically created fields.
I have found a prefect example that fits my use case which is here (https://stackblitz.com/edit/react-hook-form-dynamic-form-example) but the issue that I am facing is every time I try to download the example from stackblitz and run locally I get error below error:
{"tickets":{"message":"tickets must be a `array` type, but the final value was: `null` (cast from the value `{\n \"0name\": \"\\\"\\\"\",\n \"0email\": \"\\\"\\\"\",\n \"1name\": \"\\\"\\\"\",\n \"1email\": \"\\\"\\\"\"\n}`).\n If \"null\" is intended as an empty value be sure to mark the schema as `.nullable()`","type":"typeError"}}
I am wondering if someone could help me run this example locally, rest I can work out.
Many thanks :)

How to resolve TinyButStrong's 'at least one tag corresponding to w:tr is not found' error?

I'm creating a project to mail merge a given .odt file and provide a .odt output. When i'm performing the mail merge operation it provides me this error
TinyButStrong Error in block's definition [CiviCRM.display_name...]: at least one tag corresponding to w:tr is not found. Check opening tags, closing tags and embedding levels.
Myfilecontent.odt
[CRM. display_name;block=w:tr]
Date: 2/3/2020
Dear [CRM.postal_greeting;block=w:tr],
Thank you for joining the event...
I have no idea how to resolve this. could someone help me to solve it?
Thanks in advance!
Update
After i replaced w:tr with tbs:row, still I'm receiving a similar error
TinyButStrong Error in block's definition [CRM.display_name...]: at
least one tag corresponding to tbs:row is not found. Check opening
tags, closing tags and embedding levels.
w:tr is an XML entity for Ms Word , not ODT.
You should use the alias block=tbs:row so that its is format independent.

How can you debug / track down problems in Fluid?

I made an error when using a ViewHelper with an unsupported argument and my Fluid Partial wasn't rendered at all.
How can I debug / track down problems like these? Usually I would expect an exception to be thrown. I enabled debug preset and there is nothing in the sys_log, no error message is displayed.
Is there some setting I can use to cause error messages to be created or more information to get logged?
Reproduce
Use Fluid ViewHelper with unsupported argument (here, name is not a supported argument):
<f:uri.external name="something" uri="https://typo3.org">f.uri.external</f:uri.external>
Result
The Fluid Partial is not displayed at all.
most of the time I'm using to check do I even get wanted values before:
<f:debug>{_all}</f:debug>
or
<f:debug>{variable}</f:debug>

iTextSharp error, casting IncCell to Rectangle

I've been asked to look at C# code that's returning the following error:
Unable to cast object of type
'iTextSharp.text.html.simpleparser.IncCell' to type 'iTextSharp.text.Rectangle'.
at iTextSharp.text.pdf.PdfDocument.Add(IElement element)
at iTextSharp.text.Document.Add(IElement element)
It looks like they're using iTextSharp v5.0.2 and have not yet moved from HtmlWorker to XmlWorker.
Questions:
What is IncCell? I see it in the source docs but can't find any info about what it is - I'm assuming it's just for internal use.
Is this related to a cell in a table? A need for a Div or Paragraph within a cell?
What can they do to diagnose issues like this down to the HTML source that caused the error? I suspect this is an issue with not conforming to XHTML, but I can't verify that without knowing exactly what IElement that code was working on when it choked. It could be due to bad styling too, I have no idea at this time. Is there any kind of detail logging that will tell us what element is being processed at any given time? Should I just get them to load source and trace through it?
Is it probable that this will be fixed with an update to the latest version (currently 5.5.9), and a re-fit of XmlWorker?
Other recommendations?
Thanks!

Load Runner: InvokeMethod failure: Unable to deserialize non XmlElement node #text in path

I passing the following to LoadRunner:
<makeAtmPayment xmlns=\"http://[URL]" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">"
"<billerId>BILL01</billerId>"
"<userId>950002</userId>"
"<productCode>P1</productCode>"
"<productParameter><value>923</value></productParameter>"
"<paymentChannel>PAY01</paymentChannel>"
"<paymentAmount>2</paymentAmount>"
"<convenienceFee>1.50</convenienceFee>"
"<effectiveDate>2011-04-14</effectiveDate>"
"<accountId xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"
"<atmCardNumber>564373636363636</atmCardNumber>"
"<editedConfirmationId xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"
"</makeAtmPayment>"
and it's throwing me the following error:
InvokeMethod failure: Unable to deserialize non XmlElement node #text in path '/makeAtmPayment/productParameter/name/#text'.
Can anyone give me any pointers on what I am doing wrong ?
Thanks!!
Try to change
<productParameter><value>923</value></productParameter>
To
<productParameter><name>923</name></productParameter>
I don't understand the double quotes. There is one missing at the very beginning and there is one without a slash after xmlns=\"http://[URL]". Could it be the problem?
Is this an XML of your own creation or one picked up off of a loadrunner recording? If it is the latter consider recording twice to see what differences get picked up that you need to accommodate during your development. If it is the former, then consider validating your XML through the application's business rules before submitting it via LoadRunner, just to ensure that the XML is sound independent of your testing tool