1

Hi I know this might be ambigous but I really need help.

I am trying to display XML data using XSL Stylesheet, but I get the following below error message on my IE.

The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

Keyword xsl:choose may not contain P.


I cant display my xml data using xsl,has anyone come across this error? or a fix to it?

Snapshoot code of "xsl:choose" below.

<xsl:choose>
  <xsl:when test="/Object/Contract/TeleUWInd[.= 'True']">
    <P align="center">
      <FONT face="Century Gothic" size="2" style="BORDER-BOTTOM-STYLE: solid">Application for what what(Tele interview)</FONT>
    </P>
  </xsl:when>
  <xsl:otherwise>
    <P align="center">
      <FONT face="Century Gothic" size="2" style="BORDER-BOTTOM-         STYLE: solid">Application for Assurance Summary</FONT>
    </P>
  </xsl:otherwise>
</xsl:choose>
JLRishe
  • 99,490
  • 19
  • 131
  • 169
TMAN-MAN
  • 141
  • 1
  • 2
  • 13
  • could you try it with lower case tags? Because XML/XHTML is case sensitive therefore

    and

    are different tags http://www.w3.org/TR/xhtml1/#h-4.2

    – Joel Mar 12 '13 at 11:24
  • Are you sure that this is the particular `xsl:choose` that is causing the issue? Are there any others? Perhaps one with a `

    ` directly inside the ``?

    – JLRishe Mar 12 '13 at 12:08
  • @Joel Still does the same thing even if I do lower

    – TMAN-MAN Mar 12 '13 at 12:17
  • @JLRishe there are other xsl:choose which still contains

    ...

    – TMAN-MAN Mar 12 '13 at 12:19
  • How many? As I asked, are there any that have `P` ***directly*** inside the ``? The examples you posted have the `P`s inside a `xsl:when` and an `xsl:otherwise`, which should be ok. – JLRishe Mar 12 '13 at 12:21
  • @JLRishe..I found one directly inside ....

    On clicking the Submit button, additional FAIS checks will also run. If any of these checks against your consultant code fails, the case will not be uploaded

    and when I remove it,all works..thanx a lot..but now i get this error: Function 'SetClientID' did not return a value, or it returned a value that cannot be converted to an XSL data type. ..let me figure it out,Ill be back..thanx a lot again
    – TMAN-MAN Mar 12 '13 at 12:47

1 Answers1

0

As revealed in the comments, the issue is as the error says, a p element directly inside an xsl:choose element:

<xsl:choose>
  ...
  <xsl:otherwise>
    <xsl:if test="...">

      ....
    </xsl:if>
  </xsl:otherwise>
  <p> On clicking the ... </p>
</xsl:choose>
JLRishe
  • 99,490
  • 19
  • 131
  • 169