error in version change - xslt-1.0

When i'm using an XSLT statement for transforming and it is as below.
<xsl:when test="preceding-sibling::title/#num and contains(./item/#num,'•')">
when i'm using XSLT1.0 version there is no issue, but when i'm changing the version to 2.0, it is throwing the below error, please let me know how i can fix this.
XSLT 2.0 Debugging Error: Error: file:///C:/Users/u0138039/Desktop/Proview/MAL/Malaysian%20Civil%20Procedure%202013/XSLT/new_bull%20-%20Cols.xsl:704: Wrong occurrence to match required sequence type - Details: - XPTY0004: The supplied sequence ('4' item(s)) has the wrong occurrence to match the sequence type xs:string ('zero or one')

Try contains((./item/#num)[1],'•') to make sure there is only one node as the first argument to contains.
See http://www.w3.org/TR/xpath-functions/#func-contains, the specification indicates with fn:contains($arg1 as xs:string?, $arg2 as xs:string?) as xs:boolean that the first argument needs to be an empty sequence or a single item, the error message The supplied sequence ('4' item(s)) suggests that in your code ./item/#num selects four items.

Related

Navigation record searches specified with a missing keys or terms or both

error=Navigation record searches specified with a missing keys or terms or both
How to solve the above Oracle Endeca query error ?
This error is coming as Ntt and Ntx parameters are having the blank value.Since this is navigation query than no need to pass these parameters, NTK, Ntt and Ntx.
I tried at my end and looks like query passed to MDEX engine is not parsed properly and gives Failed to Parse URL
I hope this helps.
Thanks,
Ajay Agrawal

fixed length reader returns empty set. Weird issue

I have written a sample smooks config using fixed length reader[1] with many fields.
I see a weird issue here. That is, if i have the last field AnnualReportReturnedDate[8] in the configuration it does not return any sets. that is my set is null.
So, i checked one by one by adding all fields and my configuration works fine. When i try to add AnnualReportReturnedDate[8] filed, it is not working.(taht is empty set is returned) Further if i change the length of that filed to 2/5 it works..but it is not working fro length 8. That is ,
if i defined AnnualReportReturnedDate[2]--works, AnnualReportReturnedDate[8]--Not works.
Why do i get this type of annoying issue?
[1]
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:fl="http://www.milyn.org/xsd/smooks/fixed-length-1.3.xsd">
<fl:reader
fields="RecordId[10]?trim,CompactedCorpName[60]?trim,FileNumber[9]?trim,CorporationName[60]?trim,...........,AnnualReportReturnedDate[8]?trim,AnnualReportReturnedCode[2]?trim"
skipLines="1"></fl:reader>
</smooks-resource-list>
The issue here is, in my file, in the middle it had a line, which did not have enough length of characters. SoO, smooks skipped the whole file to process.

Fixing for warning TRCH1115 using EnsureTable element

We have a bunch of 3rd party merge modules attached to our WiX installer and during the build we get a bunch of TRCH1115 warnings. I was looking at Trying to use EnsureTable in WiX to fix Validation Errors.
But in this article the warnings/errors that they see for the Validation errors refer to the table that has the validation error. In my case the only table that it mentions is the _validation table it self. So if I am going to try an use the EnsureTable element to fix for these warnings then how would I go about finding out what table Id I should be using in the EnsureTable element?
The warnings I gets look like the following:
warning TRCH1115: The value '0' in table '_Validation', column
'KeyColumn' is invalid according to the column's validation
information. The decompiled output includes a best-effort
representation of this value.
Thanks for any help on this issue.

Relate PSVI GetSchemaInfo to the XSD Validation Error ValidationEventArgs.Message

I have a question about Microsoft's MSDN documentation for the Extenstions.GetSchemaInfo Method (XElement) for .Net framework 4.0.
I want to know if there's a way from within the
Private Sub DumpInvalidNodes(ByVal el As XElement)
If el.GetSchemaInfo.Validity <> XmlSchemaValidity.Valid Then
...
End If
End Sub
Code to get the ValidationEventArgs.Message for the invalid node. This example works fine when you have numbered XML nodes like in the example: GrandChild1, GrandChild2. You can tell which invalid node is producing the validation errors by site. But when you have XML without numbered nodes, e.g.
<Root>
<Child>
<GrandChild>AAA</GrandChild>
<GrandChild>ZZZ</GrandChild>
<GrandChild>ZZZ</GrandChild>
</Child>
</Root>
you get output that looks like this:
(1)Validating doc1 ...
(2)The 'GrandChild' element is invalid - The value 'ZZZ' is invalid according to its datatype 'GCType' - The Enumeration constraint failed.
(3)The 'GrandChild' element is invalid - The value 'ZZZ' is invalid according to its datatype 'GCType' - The Enumeration constraint failed.
(4)doc1 did not validate
(5)Invalid Element /Root
(6)Invalid Element /Root/Child
(7)Invalid Element /Root/Child/GrandChild
(8)Invalid Element /Root/Child/GrandChild
I wanted a way to tell that line (7) referred to the ErrorMessage in line (2).
I have an XML document that I'm running XSD validation against as this article shows and I wanted to parse the ValidationEventArgs.Message into a more user friendly message for complex data types. I'd like to do this in the DumpInvalidNodes() method because I have access to the invalid Node and can obtain other information from the node (like an ID) that the user can use to find and fix the validation problem.
The easiest way for you would be to modify the original code and instead of doing the node dumping after, do it in the validation handler; it'll give you the validation message and the node at the same time (simply cast the sender to an XObject and deal with it as you need).
For XML loaded from files or strings you could also use this MSDN article here. Additional hints to the user, such as line number and column position, could also be useful.

What does this Apache FOP error mean?

Error message
(Location of error
unknown)org.apache.fop.fo.Validation
Exception: Property id "_Ref191196753"
previously used; id values must be
unique in document.
Any ideas on what may cause this? Is it because I have a for-each and apply the same template multiple times?
The specification states the id of an element must be unique.
The following code produces the error message you get.
<fo:block id="_Ref191196753"/>
<fo:block id="_Ref191196753"/>
You need to search your fo-file to locate the occurences of the elements with the same id. Then make changes in your XSLT to eliminate these.