<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF8"/>
<xsl:template match="/">///////////////////////////////////////////////////////////////////////////////
// CAUTION: This file was auto-generated by `dotnet build -t:GenerateISOCurrencies`.
//          Changes to this file will be lost when the file is regenerated.
///////////////////////////////////////////////////////////////////////////////

namespace NetCash

module ISOCurrencyCodes =
<xsl:for-each select="//currency">
    /// <xsl:value-of select="@fullname"/>
    [&lt;Literal&gt;]
    let <xsl:value-of select="@isocode"/> = "<xsl:value-of select="@isocode"/>"
</xsl:for-each>
type ISOCurrencies internal (table) =
    /// Get currency by ISO code.
    member _.Item
        with get code =
            GnuCashObject.Registry.getOrCreate&lt;Commodity&gt; (
                Bindings.gnc_commodity_table_lookup (table, Bindings.GNC_COMMODITY_NS_CURRENCY, code)
            )
<xsl:for-each select="//currency">
    /// <xsl:value-of select="@fullname"/>
    member self.<xsl:value-of select="@isocode"/> = self["<xsl:value-of select="@isocode"/>"]
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
