Skip to content

XPST0003 when compiling expression #73

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 🤓 😕 )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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