Meine XML sieht wie folgt aus, dessen Name data.xmlwie die Kontrollkästchen überprüfen, ob der Wert in xml ja, und wenn nicht als ungeprüft
<?xml version="1.0" standalone="yes"?>
<CATALOG>
<orderByTitleDesc />
<orderByTitleDesc />
<orderByTitleDesc />
<orderByTitleDesc />
<orderByTitleDesc />
<orderByTitleDesc />
<orderByTitleDesc />
<orderByTitleDesc />
<CD />
<CD>
<ID>1</ID>
<LocationID>wqe</LocationID>
<ChangeValueFor>qwe</ChangeValueFor>
<Banner>wew</Banner>
<DataEntry>Yes</DataEntry>
<LocalView>No</LocalView>
<Export>Yes</Export>
<View>qwe</View>
<ActiveView>wqe</ActiveView>
<HelpFile>qwe`qw</HelpFile>
<Location01>qwe</Location01>
<Location02>eq</Location02>
<Location03>we</Location03>
<Location04>wqew</Location04>
<Location05>qws</Location05>
<Location06>sds</Location06>
<Location07>wde</Location07>
<Location08>sd</Location08>
<Location09>sad</Location09>
<Server>31 March 2014 testing with font</Server>
<Server2>171.21.102.11</Server2>
<Server3>171.21.102.11</Server3>
<CodeBase>CodeBase2</CodeBase>
<CodeBase2>ZaidiTest</CodeBase2>
<CodeBase3>test222</CodeBase3>
<ClassiscID>ClassID312131313</ClassiscID>
<ClassiscID2>31 amrch testing for font</ClassiscID2>
<ClassiscID3>ClassID2</ClassiscID3>
<Theme>VashnoDevi</Theme>
<Theme2>class</Theme2>
<Theme3>class</Theme3>
<Theme4>Theme2</Theme4>
<Theme5>Ser</Theme5>
<Theme6>Themes1test</Theme6>
</CD>
ich will, wenn <DataEntry>
<LocalView>
und <Export>
ist ja als mein Scheck In der Box ist Y aktiviert und wenn Nein, nicht deaktiviert (so wie es ist).
Meine xslt-Datei ist wie folgt: Ich will nur nur auf die Dateneingabe nur eine Checkbox, fügen Sie bitte mir sagen, wo ich Fehler mache
Myxslt Datei ist wie folgt:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body style="font-family:Helvetica Neue">
<!--<Div id="ListingScreen" style="display:Yes;">-->
<Div id="ListingScreen">
<table border="1" width="1024px" >
<tr bgcolor="blue">
<FONT
style="BACKGROUND-COLOR: #0000ff">
<FONT color="white">
<STRONG>
Maintenance of Parameters for Cube Access
</STRONG>
</FONT>
</FONT>
</tr>
<tr>
<td align="right" colspan="8">
<img src="http://localhost:51242/Images/AFKLLogo.png" alt="Smiley face" width="210"></img>
</td>
</tr>
<tr>
<td colspan="8">
<h1>WPTesting - Cube List Web Part</h1>
</td>
</tr>
<tr>
<td colspan="8" align="center">
<input type="Button" id="btnAddMasterData" value="Add Master Data" onclick="javascript:AddMasterData()"/>
<input type="Button" id="btnAdd" value=" Add " onclick="javascript:location.href='AddMaster.aspx'"/>
</td>
</tr>
<tr>
<th id="location">Location ID</th>
<th>Data Entry</th>
<th>Export</th>
<th>Local View</th>
<th>Banner</th>
<th>Server</th>
<th>View</th>
<th>Locl</th>
</tr>
<xsl:choose>
<xsl:when test="CATALOG/orderByTitle">
<xsl:for-each select="CATALOG/CD" order-by="+ TITLE">
<tr>
<td onclick="javascript:FillEditScreen(this.innerText);">
<a href="javascript:void(0);">
<p style="display:none;">
<xsl:value-of select="ID"/>
</p>
<xsl:value-of select="LocationID"/>
</a>
<input type="checkbox" id="chkdataentry" />
<xsl:value-of select='DataEntry'/>
</td>
<td>
<input type="checkbox" id="chkLocalView" />
<xsl:value-of select='LocalView'/>
</td>
<td>
<input type="checkbox" id="chkExport"/>
<xsl:value-of select='Export'/>
</td>
<td>
<xsl:value-of select="Banner"/>
</td>
<td>
<xsl:value-of select="Server"/>
</td>
<td>
<xsl:value-of select="View"/>
</td>
<td>
<xsl:value-of select="Location01"/>
</td>
</tr>
</xsl:for-each>
</xsl:when>
<xsl:when test="CATALOG/orderByTitleDesc">
<xsl:for-each select="CATALOG/CD" order-by="- TITLE">
<tr>
<td onclick="javascript:FillEditScreen(this.innerText);">
<a href="javascript:void(0);">
<p style="display:none;">
<xsl:value-of select="ID"/>
</p>
<xsl:value-of select="LocationID"/>
</a>
</td>
<input type="checkbox" name="DataEntry" value="Milk">
<xsl:if test="CATALOG/CD='Yes'">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
</input>
<!--<td>
<input type="checkbox" checked="true" id="chk" value="Milk"/>
</td>-->
<td>
<input type="checkbox" checked="true" name="Export" value="export"/>
</td>
<td>
<input type="checkbox" checked="true" name="LocalView" value="export"/>
</td>
<td>
<xsl:value-of select="Banner"/>
</td>
<td>
<xsl:value-of select="Server"/>
</td>
<td>
<xsl:value-of select="View"/>
</td>
<td>
<xsl:value-of select="Location01"/>
</td>
</tr>
</xsl:for-each>
</xsl:when>
<xsl:when test="CATALOG/orderByArtist">
<xsl:for-each select="CATALOG/CD" order-by="+ ARTIST">
<tr bgcolor="blue">
<td>
<input type="Button" id="btnArtist" value="Impala"/>
</td>
<td>
<input type="checkbox" id="chk" value="Milk"/>
</td>
<td>
<input type="checkbox" name="Export" value="export"/>
</td>
<td>
<input type="checkbox" checked="true" name="LocalView" value="export"/>
</td>
<td>
<xsl:value-of select="Banner"/>
</td>
<td>
<xsl:value-of select="Server"/>
</td>
<td>
<xsl:value-of select="View"/>
</td>
<td>
<xsl:value-of select="Locl"/>
</td>
</tr>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</table>
</Div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Die Haupt-Code ist wie thins aber es ist mir eine Fehlermeldung zu geben weiß nicht, warum
<input type="checkbox" name="DataEntry" value="Milk">
<xsl:if test="CATALOG/CD='Yes'">
<xsl:attribute name="checked">checked</xsl:attribute>
</xsl:if>
</input>
Seine Arbeit Awsome Tim Dank Sie ein Ton ... –