# HG changeset patch # User Patrick PIERRE # Date 1384697941 -3600 # Node ID 2906cd61506b4ecc3bb17de3a3c04978f1e3adcc # Parent c1f4a6143dedc62e4c2ccfeb15ac43ba7ddc08a9 Ajout de la gestion des taxes diff -r c1f4a6143ded -r 2906cd61506b RelaxNG/Examples/Metadata/metadatas.xml --- a/RelaxNG/Examples/Metadata/metadatas.xml dim. nov. 17 11:05:39 2013 +0100 +++ b/RelaxNG/Examples/Metadata/metadatas.xml dim. nov. 17 15:19:01 2013 +0100 @@ -46,7 +46,8 @@ possibilités de <name>publidoc</name>. </p> </abstract> - <price currency="EUR">13.50</price> + <price currency="EUR" excluding-tax="true" tax="0.07">12.62</price> + <price currency="EUR" excluding-tax="false" tax="0.07">13.50</price> </metadata> <!-- ================================================================== --> @@ -62,7 +63,8 @@ <subjectset> <subject>Littérature</subject> </subjectset> - <price currency="EUR">19.90</price> + <price currency="EUR" excluding-tax="true" tax="0.07">18.60</price> + <price currency="EUR" excluding-tax="false" tax="0.07">19.90</price> </metadata> <!-- ================================================================== --> @@ -108,9 +110,11 @@ <p> En accompagnant Petit Écureuil, l'adorable guide de ce voyage, il explore les paysages de nos régions, de la montagne jusqu'au bord de - la mer, en passant par la forêt ou la vallée.</p> + la mer, en passant par la forêt ou la vallée. + </p> </abstract> - <price currency="EUR">9.90</price> + <price currency="EUR" excluding-tax="true" tax="0.07">9.25</price> + <price currency="EUR" excluding-tax="false" tax="0.07">9.90</price> </metadata> </metadatas> diff -r c1f4a6143ded -r 2906cd61506b RelaxNG/publimeta.rnc --- a/RelaxNG/publimeta.rnc dim. nov. 17 11:05:39 2013 +0100 +++ b/RelaxNG/publimeta.rnc dim. nov. 17 15:19:01 2013 +0100 @@ -47,7 +47,7 @@ & keywordset? & subjectset? & abstract? - & price? + & price* # ============================================================================= @@ -167,7 +167,13 @@ price.attributes = currency.attribute -currency.attribute = attribute currency { "EUR" | "USD" } + & excluding_tax.attribute + & tax.attribute? +currency.attribute = attribute currency { + "EUR" | "USD" | "GBP" | "CAD" | "CHF" | "JPY" | "MXN" | "KRW" | "BRL" + | "INR" | "AUD" | "RUB" | "CNY" | "NOK" | "SEK" | "DKK" } +excluding_tax.attribute = attribute excluding-tax { xsd:boolean } +tax.attribute = attribute tax { xsd:float } price.content = xsd:float