|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is there any benefit to creating a variable and s
Am 09.06.2024 um 11:25 schrieb Martin Honnen martin.honnen@xxxxxx:
Am 09.06.2024 um 11:19 schrieb Roger L Costello costello@xxxxxxxxx: In Saxon 12.4 (tested with EE but should work with PE as well, I think) <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="4.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="#all" expand-text="yes"> <xsl:item-type name="ICAO-type" as="enum('KBOS')"/> <xsl:param name="ICAO" as="ICAO-type"/> <xsl:template match="/" name="xsl:initial-template">
<test>{$ICAO}</test>
</xsl:template></xsl:stylesheet>
?ICAO="'KBS'" giving Type error on line 13 column 6 of param-as-enum-test3.xsl:
XPTY0004 The required item type of the value of variable $ICAO is
enum("KBOS"); the
supplied value "KBS" does not match.
In template xsl:initial-template on line 12 column 4 of
param-as-enum-test3.xsl:
The required item type of the value of variable $ICAO is enum("KBOS");
the supplied value "KBS" does not match.If you pass e.g. ?ICAO="'KBOS'" the value is accepted. Of course for a single value you probably don't need an enum but I hope if you have a list of allowed values this helps.
|
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
|

Cart








