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: RE: [tag-comment] Comment on Test Assertion Markup Language


 Stephen:

You may in addition use a general TA for summarizing the conditions to
belong to such an UBL subset:

<taml:testAssertion id="Small-Business-Subset" name="Small Business
Subset test" enable="true">
        <taml:normativeSource>.</taml:normativeSource>
        <taml:target type="document" >/</taml:target>
        <taml:predicate>INV1 and INV2 and INV3 and .... INV10 and INV11
and INV12 ...</taml:predicate>
        <taml:prescription level="mandatory"/>
        <taml:report label="failed" message="Not a Small Business Subset
document">The file does not contain a standard UBL 2
invoice.</taml:report>
    </taml:testAssertion>

Note: In "TAMELizer" , the predicate would be like:

<taml:predicate>taml:INV1 = 'pass' 
	and taml:INV2 = 'pass' 
	and taml:INV3 = 'pass'
	...
	and taml:INV12  = 'pass'
</taml:predicate>

So practically, if you put together several "subsets" definitions and
run all of these on the same document, the test report will tell which
subsets this document conforms to, just by looking at the "top-level"
test assertion for each subset.

-jacques  

-----Original Message-----
From: Stephen Green [mailto:stephengreenubl@gmail.com] 
Sent: Sunday, March 21, 2010 3:44 PM
To: tag-comment@lists.oasis-open.org
Cc: ubl-comment@lists.oasis-open.org
Subject: [tag-comment] 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

--
This publicly archived list offers a means to provide input to the OASIS
Test Assertions Guidelines (TAG) TC.

In order to verify user consent to the Feedback License terms and to
minimize spam in the list archive, subscription is required before
posting.

Subscribe: tag-comment-subscribe@lists.oasis-open.org
Unsubscribe: tag-comment-unsubscribe@lists.oasis-open.org
List help: tag-comment-help@lists.oasis-open.org
List archive: http://lists.oasis-open.org/archives/tag-comment/
Feedback License: http://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
Committee:
http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=tag
Join OASIS: http://www.oasis-open.org/join/



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