[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to test whether boolean parameter has been set
Am 29.10.2018 um 10:08 schrieb Jorge . chocolate.camera@xxxxxxxxx: > In XSLT2, how would you test whether a boolean global parameter > optionally empty > > B B <xsl:param name="THING" as="xs:boolean?"/> > > has been given a value at runtime? The spec https://www.w3.org/TR/xslt-30/#element-param says "If a parameter that is notexplicitly mandatory <https://www.w3.org/TR/xslt-30/#dt-explicitly-mandatory>has noexplicit default <https://www.w3.org/TR/xslt-30/#dt-explicit-default>value, then it has an*implicit default*value, which is the empty sequence if there is an|as|attribute" so in your case you could check with https://www.w3.org/TR/xquery-operators/#func-empty B empty($THING) although that simply checks the value is the empty sequence, you can't tell whether the variable has that value as its implicit default value or because the empty sequence was set as the value externally when running the stylesheet.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|