OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

tag-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Comment on Test Assertion Markup Language


Congratulations to TAG TC on the set of three committee drafts
commencing public review stage.

I just wish to make a further comment on the ways test assertions
such as those marked up with the TAG TC Test Assertion Markup
Language (TAML) can be used to support customisations of a
standard like Universal Business Language: It occurrs to me that
besides its currently documented use for UBL custom calculation
models
http://docs.oasis-open.org/ubl/guidelines/UBL2-Customization1.0cs01.html
it might also be used to formally define a UBL subset (like the Small
Business Subset) by use of its potentials to 1) list XPath statements
and 2) denote these as mandatory, permitted or preferred.

I put together a quick example to show this concept (not proof of concept
as yet as it is not yet properly tested, eg with tools such as TAMELizer):

the set of test assertions could start with ones which show parts of
the document made mandatory by the UBL standard itself

...
    <taml:testAssertion id="INV1" name="Invoice1" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice) ge 1</taml:predicate>
        <taml:prescription level="mandatory"/>
        <taml:report label="failed" message="Not a standard UBL 2
invoice">The file does not contain a standard UBL 2
invoice.</taml:report>
    </taml:testAssertion>
    <taml:testAssertion id="INV2" name="Invoice2" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:ID) eq 1</taml:predicate>
        <taml:prescription level="mandatory"/>
        <taml:report label="failed" message="Not a standard UBL 2
invoice">The file does not contain a standard UBL 2
invoice.</taml:report>
    </taml:testAssertion>
    <taml:testAssertion id="INV3" name="Invoice3" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:IssueDate) eq 1</taml:predicate>
        <taml:prescription level="mandatory"/>
        <taml:report label="failed" message="Not a standard UBL 2
invoice">The file does not contain a standard UBL 2
invoice.</taml:report>
    </taml:testAssertion>
    <taml:testAssertion id="INV3" name="Invoice3" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cac:AccountingSupplierParty)
eq 1</taml:predicate>
        <taml:prescription level="mandatory"/>
        <taml:report label="failed" message="Not a standard UBL 2
invoice">The file does not contain a standard UBL 2
invoice.</taml:report>
    </taml:testAssertion>
...
etc
...

and it could then proceed to list the optional elements and attributes
which are part of the subset

...

    <taml:testAssertion id="INV9" name="Invoice9" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:CopyIndicator) eq
1</taml:predicate>
        <taml:prescription level="permitted"/>
    </taml:testAssertion>
    <taml:testAssertion id="INV9" name="Invoice9" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:CustomizationID) eq
1</taml:predicate>
        <taml:prescription level="permitted"/>
    </taml:testAssertion>
    <taml:testAssertion id="INV10" name="Invoice10" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:ProfileID) eq 1</taml:predicate>
        <taml:prescription level="permitted"/>
    </taml:testAssertion>
    <taml:testAssertion id="INV11" name="Invoice11" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:CopyIndicator) eq
1</taml:predicate>
        <taml:prescription level="permitted"/>
    </taml:testAssertion>
    <taml:testAssertion id="INV12" name="Invoice12" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:UUID) eq 1</taml:predicate>
        <taml:prescription level="permitted"/>
    </taml:testAssertion>
    <taml:testAssertion id="INV13" name="Invoice13" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" idscheme="'document'">/</taml:target>
        <taml:predicate>count(//in:Invoice/cbc:TaxPointDate) eq
1</taml:predicate>
        <taml:prescription level="permitted"/>
    </taml:testAssertion>
...
etc
...

There would be a design / requirements choice as to whether to proceed
to list elements and attributes of UBL which are not a part of the subset.
These could be denoted in various ways regarding the 'prescription' level:
they might be ideally 'permitted' but not 'preferred' and there might be ways
to represent this. Bearing mind there might be a lot of these elements outside
of the subset but within the UBL standard but brevity might not be an
issue if the subset test assertions are generated.

All the best with the TAG public review.

Best regards

Steve
---
Stephen D Green


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]