का उपयोग कर प्रत्येक तालिका के लिए पहली HTML तालिका पंक्ति को शीर्ष पंक्ति में कनवर्ट करें मेरे पास मेरे XML के अंदर कुछ HTML सामग्री है। सामग्री को सही क्षेत्र में खींचने के लिए पहले मैं केवल <xsl:copy-of select="customFields/customField[@name='mainContent']/html"/>
का उपयोग कर सकता था। thead/tr/th
के सेट में प्रत्येक तालिका के <tbody>
के अंदर पहले <tr>
को परिवर्तित करने की एक नई आवश्यकता है।XSLT
मैं कैसे कन्वर्ट करने के लिए पर उलझन में हूँ, वास्तव में भी किनारे नहीं कहां से शुरू करें:
...
<customField name="mainContent" type="Html">
<html>
<h1>Page Heading</h1>
<p>Gusto te minim tempor elit quam. Dolore vel accumsan parum option me. Demonstraverunt congue nisl soluta tincidunt seacula. Soluta saepius demonstraverunt praesent claritatem mutationem. Modo te ullamcorper vel augue veniam. Nunc investigationes dolor iriure typi in.</p>
<p>Gusto te minim tempor elit quam. Dolore vel accumsan parum option me. Demonstraverunt congue nisl soluta tincidunt seacula. Soluta saepius demonstraverunt praesent claritatem mutationem. Modo te ullamcorper vel augue veniam. Nunc investigationes dolor iriure typi in.</p>
<table cellspacing="0" cellpadding="0" summary="" border="0">
<tbody>
<tr>
<td>Heading 1</td>
<td>Heading 2</td>
<td>Heading 3</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
</tbody>
</table>
</html>
</customField>
...
में:
...
<customField name="mainContent" type="Html">
<html>
<h1>Page Heading</h1>
<p>Gusto te minim tempor elit quam. Dolore vel accumsan parum option me. Demonstraverunt congue nisl soluta tincidunt seacula. Soluta saepius demonstraverunt praesent claritatem mutationem. Modo te ullamcorper vel augue veniam. Nunc investigationes dolor iriure typi in.</p>
<p>Gusto te minim tempor elit quam. Dolore vel accumsan parum option me. Demonstraverunt congue nisl soluta tincidunt seacula. Soluta saepius demonstraverunt praesent claritatem mutationem. Modo te ullamcorper vel augue veniam. Nunc investigationes dolor iriure typi in.</p>
<table cellspacing="0" cellpadding="0" summary="" border="0">
<thead>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
<th>Heading 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
<tr>
<td>sample</td>
<td>sample</td>
<td>sample</td>
</tr>
</tbody>
</table>
</html>
</customField>
...
अच्छा सवाल है, +1। सबसे मौलिक और शक्तिशाली एक्सएसएलटी डिजाइन पैटर्न - अतिव्यापी पहचान नियम का उपयोग करके, पूर्ण और संक्षिप्त समाधान के लिए मेरा उत्तर देखें। –