KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
To conform with the <boolean> spec of Xml-RPC I need to transform my xs:boolean from true|false to 1|0 . I solved this using xsl:choose <xsl:template match="Foo"> <member> <name>Baz</name> <value> <boolean> <xsl:choose> <xsl:when test=".='true'">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </boolean> </value> </member> </xsl:template> but was wondering if there is a less brittle way of controlling how boolean values are rendered when transformed with xslt 1.0.
Tags (comma-separated)
Save Edits
Cancel