Subject:FOTY0012: Cannot get the typed value of an element with element-only content Author:Paul van Bavel Date:12 Feb 2013 05:55 PM
I get this error messages:
FOTY0012: Cannot get the typed value of an element with element-only content
I do not understand why.
I have a very simple XML file: users with their address and telephone etc. data that I want to display in a table that has to be inserted in a PHP-5 page.
The XSD file is generated from the XML file. When running the XSLT I get the above error message, that I do not ubderstand.
Please help
Subject:FOTY0012: Cannot get the typed value of an element with element-only content Author:Paul van Bavel Date:13 Feb 2013 03:13 PM Originally Posted: 13 Feb 2013 09:15 AM
Subject:FOTY0012: Cannot get the typed value of an element with element-only content Author:Srividya Chandrasekaran Date:11 Feb 2016 06:12 PM
Hi,
I am getting below exception while executing the XSLT with a sample XML file:
java.lang.RuntimeException: Error: at xsl:value-of on line 19 of MESCHA%7E2.XSL:
FOTY0012: Cannot get the typed value of an element with element-only content
at com.exln.stylus.CSaxon8Driver.doProcessing(CSaxon8Driver.java:297)
at com.exln.stylus.CProcessorDriver.process(CProcessorDriver.java:116)
I do not understand the error. Any help would be appreciated
Subject:FOTY0012: Cannot get the typed value of an element with element-only content Author:Ivan Pedruzzi Date:17 Aug 2016 07:59 PM
I changed your XSLT in few places now it runs without errors.
The XSLT processor Stylus Studio defaults to is Saxon Enterprise which is a schema aware processor. When the XML input links to a schema, Saxon takes advantage of the schema information to create a more efficent execution plan but it's also much stricter in evaluating XPath Expressions.
Here an example, this expression
<xsl:value-of select="current()/agile:RedlinedBOMRowCurrent/agile:ItemProductLines"/>
throws this error
<<"Cannot get the typed value of an element (ItemProductLines) with element-only content">>
forcing the value to a string solves the problem
<xsl:value-of select="current()/agile:RedlinedBOMRowCurrent/agile:ItemProductLines/string()"/>
this expression
<xsl:when test="($itemtype='Part','Device Identifier') and (agile:RedlinedBOMRow)">
throws this error
<<"Effective boolean value is not defined">>
change the expression like this solves the problem
<xsl:when test="($itemtype=('Part','Device Identifier')) and (exists(agile:RedlinedBOMRow))">
Subject:FOTY0012: Cannot get the typed value of an element with element-only content Author:Ivan Pedruzzi Date:17 Aug 2016 10:39 PM
This is not a Stylus Studio problem if you like us to help with XSLT programming contact
stylussupport@ivitechnologies.com to get a quote for professional service engagement.