anmarie63 Posted December 16, 2009 Share Posted December 16, 2009 I am getting the following validation error: fo:table is missing child elements. Required Content Model: (marker*,table-column*,table-header?,table-footer?,table-body+.All of these elements are defined in my XSL sheet. Does anyone have an idea of what this error means? <fo:flow flow-name="xsl-region-body"><fo:table table-layout...> <fo:table-column "column info..."/> <fo:table-header>..</fo:table-header> <xsl:choose> <xsl:when test="(@id='Dataserver') and (@class='war') and (@property='public')"> <fo:table-body> <xsl:variable name="varNormalBGColor">rgb(255,255,255)</xsl:variable> <xsl:variable name="varAccentBGColor">rgb(230,230,230)</xsl:variable> <fo:table-row> . . </fo:table-row> </fo:table-body> </xsl:when> <xsl:otherwise> <xsl:if test="@method='none'"> There are no attributes </xsl:if> </xsl:otherwise> </xsl:choose> </fo:table></fo:flow> Link to comment Share on other sites More sharing options...
Martin Honnen Posted December 16, 2009 Share Posted December 16, 2009 That is difficult to solve with only a snippet of the XSLT shown. Consider to post minimal but complete XML input and XSLT stylesheet samples that allow us to reproduce the problem. Of course you also need to tell us exactly which tool you have used that gives you that error message.The only potential issue I see in your snippet is that you conditionally create the fo:table-body element. That way, depending on your input, no fo:table-body element might be created. Link to comment Share on other sites More sharing options...
anmarie63 Posted December 16, 2009 Author Share Posted December 16, 2009 The tool I am using is Eclipse. Here are my XML and XSL docs:XML <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="war.xsl" type="text/xsl"?><WAR><servlet id="DataServer" class="war" property="public"> <method name="getadminconsole" description="des" defined="er"></method> <method name="getstats" description="des" defined="er"></method> <method name="getsubmissions" description="des" defined="er"></method></servlet><servlet id="DataServer" class="war" property="private"> <method name="geteois" description="des" defined="we"></method> <method name="gethistory" description="des" defined="er"></method> <method name="getprojects" description="des" defined="vb"></method> <method name="getorginfo" description="fd" defined="er"></method> <method name="getprimcompinfo" description="des" defined="de"></method> <method name="getseccompinfo" description="" defined="fg"></method></servlet><servlet id="DataServer" class="war" property="private methods"> <method name="none"></method></servlet><servlet id="DataServer" class="viewport" property="public"> <method name="getmenu" description="des" defined="ty"></method> <method name="getmenuitem" description="des" defined="ty"></method></servlet><servlet id="DataServer" class="viewport" property="private"> <method name="none"></method></servlet><servlet id="DataServer" class="viewport" property="private methods"> <method name="none"></method></servlet><servlet id="Ajax" class="user" property="public"> <method name="usersjson" description="des" defined="jk"></method></servlet><servlet id="Ajax" class="user" property="private"> <method name="getuserinfo" description="des" defined="jk"></method> <method name="getuserroles" description="des" defined="jk"></method></servlet><servlet id="Ajax" class="user" property="private methods"> <method name="none"></method></servlet></WAR> XSL. I moved the choose statement to just before the <fo:table> statement but I still got the error msg. <fo:page-sequence master-reference="table"><fo:flow flow-name="xsl-region-body"> <fo:table table-layout="fixed" width="100%" border-width="0.5pt" border-color="rgb(166,166,166)" border-style="solid" font-family="verdana" font-size="10pt" space-before="20pt"> <fo:table-column column-width="5%"/> <fo:table-column column-width="80%"/> <fo:table-column column-width="15%"/> <fo:table-header> ..... </fo:table-header><xsl:choose><xsl:when test="(@id='Dataserver') and (@class='war') and (@property='public')"><fo:table-body><xsl:variable name="varNormalBGColor">rgb(255,255,255)</xsl:variable><xsl:variable name="varAccentBGColor">rgb(230,230,230)</xsl:variable> <fo:table-row> <xsl:attribute name="background-color"> <xsl:choose> <xsl:when test="(position() mod 2) = 0"> <xsl:value-of select="$varNormalBGColor"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$varAccentBGColor"/> </xsl:otherwise> </xsl:choose> </xsl:attribute> <fo:table-cell padding="5pt,10pt" border-style="solid" border-color="rgb(166,166,166)"> <fo:block><fo:external-graphic src="arrow.png" content-width="9pt" content-height="9pt"/></fo:block></fo:table-cell><fo:table-cell padding="5pt" border-style="solid" border-color="rgb(166,166,166)"> <fo:block font-weight="bold"><xsl:value-of select="name"/></fo:block> <fo:block font-weight="normal" font-family="tahoma"><xsl:value-of select="description"/></fo:block></fo:table-cell><fo:table-cell padding="1pt" border-style="solid" border-color="rgb(166,166,166)"> <fo:block><xsl:value-of select="defined"/></fo:block></fo:table-cell></fo:table-row></fo:table-body></xsl:when><xsl:otherwise><xsl:if test="@method='none'"> There are no Public properties for this class</xsl:if></xsl:otherwise></xsl:choose> </fo:table></fo:flow></fo:page-sequence> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.