Skip to content

XPST0003 when compiling expression #73

@wstaelens

Description

@wstaelens

I'm calling:

XPath2Expression.Compile(foo, nsManager);

where

string foo is:

not(../../cbc:InvoicedQuantity or ../../cbc:CreditedQuantity) or @unitCode =            if (/ubl:Invoice) then             ../../cbc:InvoicedQuantity           else             ../../cbc:CreditedQuantity/@unitCode

originating from a schematron:

		<!-- Price -->
		<rule context="cac:Price/cbc:BaseQuantity[@unitCode]">
			<let name="hasQuantity" value="../../cbc:InvoicedQuantity or ../../cbc:CreditedQuantity" />
			<let name="quantity" value="           if (/ubl:Invoice) then             ../../cbc:InvoicedQuantity           else             ../../cbc:CreditedQuantity" />
			<assert id="PEPPOL-EN16931-R130" test="not($hasQuantity) or @unitCode = $quantity/@unitCode" flag="fatal">Unit code of price base quantity MUST be same as invoiced quantity.</assert>
		</rule>

(trying to figure out if the error is in schematron implementation or this library 🤓 😕 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions