<xsl:value-of select=".">
to print xml, you need to place below tag at first line in rtf
<?xdo-debug-level:'STATEMENT'?>
XSL Tags
|
Output
|
<xsl:if test="count(//G_MAIN/G_INV)>1">
true statement
</xsl:if>
<xsl:if test="count(//G_MAIN/G_INV) > 10">
<?count(//G_MAIN/G_INV)?>
</xsl:if>
|
true statement
20
|
XSL Tags
|
Output
|
<xsl:choose>
<xsl:when
test="count(//G_MAIN/G_INV)>10">
COUNT IS MORE THAN 10
</xsl:when>
<xsl:otherwise>
COUNT IS LESS THAN 10
</xsl:otherwise>
</xsl:choose
|
COUNT IS MORE THAN 10
|
Define Template
|
<xsl:template name="calcuateArea">
<xsl:param name="width"/>
<xsl:param name="height"/>
<xsl:value-of select="$width *
$height"/>
</xsl:template>
|
|
Call Template
|
<xsl:call-template
name="calcuateArea">
<xsl:with-param name="width"
select="10"/>
<xsl:with-param name="height"
select="50"/>
</xsl:call-template>
|
<TestScoreTable> <TestScores> <TestCategory>Mathematics</TestCategory> <TestScore width ="15"> <TestScoreRange>0-20</TestScoreRange> <NumofStudents>30</NumofStudents>
<?split-column-header:group element name?>
TestScores<?split-column-data:group element name?>
<?split-column-width:name?>
or<?split-column-width:@width?>
<?split-column-width:name?>
, where name is the XML element tag name that contains the value for the width.<?split-column-width:@width?>
to use the value of that attribute.<?split-column-width-unit:value?>
Width Definition | Column 1 (Width = 10) | Column 2 (Width = 12) | Column 3 (Width = 14) |
---|---|---|---|
Multiplier not present -% width
|
10/10+12+14*100 28%
|
%Width = 33%
|
%Width =39%
|
Multiplier = 6 - width
|
60 pts
|
72 pts
|
84 pts
|
<?horizontal-break-table:number?>
Test Score | Test Score Range 1 | Test Score Range 2 | Test Score Range 3 | ...Test Score Range n |
---|---|---|---|---|
Test Category
|
# students in Range 1
|
# students in Range 2
|
# students in Range 3
|
# of students in Range n
|
<TestScoreRange>
determine how many columns are required. In this case there are five columns: 0-20, 21-40, 41-60, 61-80, and 81-100. For each column there is an amount element (<NumOfStudents>
) and a column width attribute (<TestScore width="15">
).<?xml version="1.0" encoding="utf-8"?> <TestScoreTable> <TestScores> <TestCategory>Mathematics</TestCategory> <TestScore width ="15"> <TestScoreRange>0-20</TestScoreRange> <NumofStudents>30</NumofStudents> </TestScore> <TestScore width ="20"> <TestScoreRange>21-40</TestScoreRange> <NumofStudents>45</NumofStudents> </TestScore> <TestScore width ="15"> <TestScoreRange>41-60</TestScoreRange> <NumofStudents>50</NumofStudents> </TestScore> <TestScore width ="20"> <TestScoreRange>61-80</TestScoreRange> <NumofStudents>102</NumofStudents> </TestScore> <TestScore width ="15"> <TestScoreRange>81-100</TestScoreRange> <NumofStudents>22</NumofStudents> </TestScore> </TestScores> <TestScoreTable>
Default Text Entry | Form Field Help Text Entry |
---|---|
Group:TestScores
| <?for-each:TestScores?> |
Test Category
| <?TestCategory?> |
Column Header and Splitting
| <?split-column-header:TestScore?> <?split-column-width:@width?> <?TestScoreRange?>% |
Content and Splitting
| <?split-column-data:TestScore?> <?NumofStudents?> |
end:TestScores
| <?end for-each?> |
<TestCategory>
data element, that is, Mathematics, which is also the row heading.<?split-column-width-unit:value?>
), the column is split on a percentage basis. Wrapping of the data occurs if required.<?split-column-width-unit:value?>
) were present, then the columns have a specific width in points. If the total column widths were wider than the allotted space on the page, then the table breaks onto another page.
Type
|
Output
|
|
Count elements (Students) in XML
|
<?count(STUDENT)?>
|
|
Name of the Element if exists
|
<?//*[name()=’ROLL_NO’]?>
|
|
Starts-with
|
<?//*[starts-with(name(), 'ROLL_NO')]?>
|
Type
|
Output
|
|
Count elements (Students) in XML
|
3
|
|
Name of the Element if exists
|
1201
|
|
Starts-with
|
1201
|