A sequence of more than one item is not allowed as the first
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Thu Jul 03, 2014 3:32 pm
A sequence of more than one item is not allowed as the first
Post by srinivas.chintu85 »
Hi Guys,
I have an XML file with the below psudo code.
In my XSLT file for translating the input XML i have the below psudo code
The above XSLT code is resulting the below error bcz we have 2 subscriberinfo blocks 1st block has date 2014-02-01 and 2nd block has 2014-04-01
org.hphc.enrollment.policy.trax.exceptions.TraxException: thrown by <unknown>: message: org.hphc.enrollment.policy.trax.exceptions.TraxException: thrown by <unknown>:
message: Failed to convert to Member Canonical.: cause: net.sf.saxon.trans.XPathException: cause
message: A sequence of more than one item is not allowed as the first argument of normalize-space() ("2014-02-01", "2014-04-01") :
cause: org.hphc.enrollment.policy.trax.exceptions.TraxException: cause message: org.hphc.enrollment.policy.trax.exceptions.TraxException: thrown by <unknown>:
message: Failed to convert to Member Canonical.: cause: net.sf.saxon.trans.XPathException: cause
message: A sequence of more than one item is not allowed as the first argument of normalize-space() ("2014-02-01", "2014-04-01")
Your solution for this issue will be appreciated
I have an XML file with the below psudo code.
Code: Select all
<eehcf:PolicyUnit .......>
<eehcf:SubscriberInfo change="NEW">
<hcfd:MaintenanceInfo>
<hcfd:MaintenanceAction value="Add">
<ucf:Version name="submitted" value="030"/>
</hcfd:MaintenanceAction>
<hcfd:MaintenanceReason value="XN"/>
<hcfd:MaintenanceEffectiveDate value="2014-02-01"/>
</hcfd:MaintenanceInfo>
</eehcf:SubscriberInfo>
<eehcf:SubscriberInfo change="NEW">
<hcfd:MaintenanceInfo>
<hcfd:MaintenanceAction value="None">
<ucf:Version name="submitted" value="030"/>
</hcfd:MaintenanceAction>
<hcfd:MaintenanceReason value="XN"/>
<hcfd:MaintenanceEffectiveDate value="2014-04-01"/>
</hcfd:MaintenanceInfo>
</eehcf:SubscriberInfo>
</eehcf:PolicyUnit>
In my XSLT file for translating the input XML i have the below psudo code
Code: Select all
<xsl:for-each select="/eehcf:PolicyUnit/eehcf:SubscriberInfo">
<xsl:choose>
<!--For CHANGE policy uses the maintenance effective date if there is one at the coverage level node.-->
<xsl:when test="/eehcf:PolicyUnit/@change='CHANGED' and normalize-space(hcfd:MaintenanceInfo/hcfd:MaintenanceEffectiveDate/@value)">
<xsl:attribute name="effDate">
<xsl:value-of select="hcfd:MaintenanceInfo/hcfd:MaintenanceEffectiveDate/@value">
</xsl:value-of>
</xsl:attribute>
</xsl:when>
<!--This will be used for ADD policy transactions. For ADDs use the same date as the policy effective date.-->
<xsl:when test="/eehcf:PolicyUnit/@change='NEW' and (normalize-space(hcfd:EnrollmentInfo/hcfd:Coverage[1]/hcfd:EnrollmentDates/hcfd:BenefitDates/ucf:BeginDate/@value) or normalize-space(hcfd:EnrollmentInfo/hcfd:EnrollmentDates/hcfd:EligibilityDateRange/ucf:BeginDate/@value))">
<xsl:choose>
<xsl:when test="normalize-space(hcfd:EnrollmentInfo/hcfd:Coverage[1]/hcfd:EnrollmentDates/hcfd:BenefitDates/ucf:BeginDate/@value)">
<xsl:attribute name="effDate">
<xsl:value-of select="hcfd:EnrollmentInfo/hcfd:Coverage[1]/hcfd:EnrollmentDates/hcfd:BenefitDates/ucf:BeginDate/@value">
</xsl:value-of>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="effDate">
<xsl:value-of select="hcfd:EnrollmentInfo/hcfd:EnrollmentDates/hcfd:EligibilityDateRange/ucf:BeginDate/@value">
</xsl:value-of>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:for-each
org.hphc.enrollment.policy.trax.exceptions.TraxException: thrown by <unknown>: message: org.hphc.enrollment.policy.trax.exceptions.TraxException: thrown by <unknown>:
message: Failed to convert to Member Canonical.: cause: net.sf.saxon.trans.XPathException: cause
message: A sequence of more than one item is not allowed as the first argument of normalize-space() ("2014-02-01", "2014-04-01") :
cause: org.hphc.enrollment.policy.trax.exceptions.TraxException: cause message: org.hphc.enrollment.policy.trax.exceptions.TraxException: thrown by <unknown>:
message: Failed to convert to Member Canonical.: cause: net.sf.saxon.trans.XPathException: cause
message: A sequence of more than one item is not allowed as the first argument of normalize-space() ("2014-02-01", "2014-04-01")
Your solution for this issue will be appreciated
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service