CNXML Rendering Test: A Module for Testing CNXML Tags and Attributes, Study notes of Programming Languages

A test module for various cnxml tags and attributes, including <example>, <exercise>, <rule>, <definition>, <quote>, and others. It explores their usage and rendering in a target platform external to enterprise rhaptos. Examples, exercises, and rules, as well as explanations and solutions.

Typology: Study notes

2011/2012

Uploaded on 10/20/2012

christina
christina 🇺🇸

4.6

(23)

393 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Connexions module: m34691 1
CNXML Rendering Test -partial
Allyn Radford
This work is produced by The Connexions Project and licensed under the
Creative Commons Attribution License
Abstract
This module is being used to test a range of cnxml tags and attributes and how they render in a
target platform external to Enterprise Rhaptos.
1 About this Module
This module is being used to test a range of cnxml tags and attributes and how they render in a target
platform external to Enterprise Rhaptos. The content is intended to be self documenting and includes the
values of the attributes and sub-elements where they have been used so that the rendering can be checked
for accuracy very easily.
2 Example Tag
Example Label 1
This is an example of the
<
example
>
tag. The value of the 'type' attribute is "Example" and the
uses the
<
label
>
tag which has a value of "Example Label".
Example Label 2
This is the second example of the
<
example
>
tag. It is intended o test the numbering of examples.
The value of the 'type' attribute is "Example" and the uses the
<
label
>
tag which has a value of
"Example Label". This example also uses CDATA tags to display the element tags correctly.
3 Exercise Tag
This section tests the rendering of the
<
exercise
>
tag and the 'child' tags
<
problem
>
that denes the
problem,
<
solution
>
tag and in the nal example the
<
commentary
>
tag is used.
Exercise 1
(Solution on p. 5.)
If you use the
<
exercise
>
tag with a 'type' attribute value of "ExerciseType" then all the exercises
of the same type will be numbered sequentially. This means that in the next three exercises where
the same 'type' has been used, the numbers will increment independently of any other use of this
tag. Does it display correctly?
Exercise 2
(Solution on p. 5.)
If you repeat the exercise above and still use the
<
exercise
>
tag with a 'type' attribute value of
"ExerciseType". Does the numbering still display correctly?
Version 1.1: Jul 6, 2010 1:46 am GMT-5
http://creativecommons.org/licenses/by/3.0/
http://cnx.org/content/m34691/1.1/
pf3
pf4
pf5

Partial preview of the text

Download CNXML Rendering Test: A Module for Testing CNXML Tags and Attributes and more Study notes Programming Languages in PDF only on Docsity!

CNXML Rendering Test -partial

Allyn Radford

This work is produced by The Connexions Project and licensed under the Creative Commons Attribution License †

Abstract This module is being used to test a range of cnxml tags and attributes and how they render in a target platform external to Enterprise Rhaptos.

1 About this Module

This module is being used to test a range of cnxml tags and attributes and how they render in a target platform external to Enterprise Rhaptos. The content is intended to be self documenting and includes the values of the attributes and sub-elements where they have been used so that the rendering can be checked for accuracy very easily.

2 Example Tag

Example Label 1 This is an example of the tag. The value of the 'type' attribute is "Example" and the uses the

3 Exercise Tag

This section tests the rendering of the tag and the 'child' tags that denes the problem, tag and in the nal example the tag is used.

Exercise 1 (Solution on p. 5.) If you use the tag with a 'type' attribute value of "ExerciseType" then all the exercises of the same type will be numbered sequentially. This means that in the next three exercises where the same 'type' has been used, the numbers will increment independently of any other use of this tag. Does it display correctly? Exercise 2 (Solution on p. 5.) If you repeat the exercise above and still use the tag with a 'type' attribute value of "ExerciseType". Does the numbering still display correctly? ∗Version 1.1: Jul 6, 2010 1:46 am GMT- †http://creativecommons.org/licenses/by/3.0/

Exercise 3 (Solution on p. 5.) This instance of the tag is the same as those above but it includes the tag as well. Does it still display correctly? This text is the commentary on the third example of the usage of the tag.

4 Rule Tag

The example below uses the tag with its two child tags 'statement' and 'proof'. It also uses the 'example' element to provide readers with an example of the rule. (Oh, and I pinched the example of using the tag from the Complete List of Tags... -Thanks)

Theorem 1: Pythagorean Theorem On a right triangle, the sum of the squares of the sides equals the square of the hypotenuse. Proof: Your favorite proof goes here. Example Take a right triangle whose sides are of length 3, 4, and 5. In this case the sum of the square of the two shorter sides is 9+16=25. The square of the hypotenuse is 25. So the theorem holds.

5 Denition tag

There are several methods an author can use to provide readers with statements of denition. This section will use the various display options provided by the <denition> tag with some additional variations created by adding eligible sub-elements such as 'example'. The three forms used will be , and .

aside: This use of the tag of attribute type "aside" is being used to inform the readers that the tag is a CNXML Reference Element and as such it is used at the end of a cnxml document both in syntax and display.

Denition 1: functionality

  1. the quality of being suited to serve a purpose well; practicality. Example "I like the feel and functionality of this bakeware. It makes cooking easier."
  2. the range of operations that can be run on a computer or other electronic system Example "I like the feel and functionality of this application. It enables me to perform the tasks I need to do in a convenient manner."

See Also: design, implement Denition 2: example

  1. a thing characteristic of its kind or illustrating a general rule Example "This cnxml document is a series of examples of cnxml elements."

forms are valid. Other attributes of the tag can be used to take the reader to content elsewhere in a document or to a dierent document or web location. Tags like and , however, are quite simple and are only used in one way. The are used respectively in the following sentences to demonstrate the display of sub-text and super-text. "The northern tip of the lake, or TipNorth, is 10 miles south of the campsite." "Neil Armstrong was the 1st^ man on the moon." The tag is another tag with several attributes. It is similar in some ways to the tag. You could think of one as specifying horizontal space within a line and other as specifying vertical space in the form of additional lines. For instance, if you wanted to create an underlined blank space for someone to write in a value you could do something like, "A water molecule is made up of two atoms and one atom." If you wanted to separate this statement from a similar statement you could also break the paragraph here and continue on a new line or add multiple, underlined empty lines

by using the tag. The underlined empty lines were created using the 'eect' attribute with a value of "underline". The last tag to cover in this section is the 'preformat' tag. It is used to display text for which the format of that text has been predened by the author. For example,

Roses are red Violets are blue Sugar is sweet And all girls have cooties!

8 Test of Title Rendering - Level 1

8.1 Level 2

8.1.1 Level 3

8.1.1.1 Level 4

This was a test of title levels and their display.

9 Conclusion

This module uses many of the cnxml tags that have not been well tested in the target platform. It can be tested to determine the correct rendering via the rendering engine and the style sheets.

Solutions to Exercises in this Module

Solution to Exercise (p. 1) Yes! Solution to Exercise (p. 1) It is correct if the numbering has incremented. Solution to Exercise (p. 2) If the "comment" was displayed correctly in this example then the answer is "yes".

Glossary

Denition 3: design purpose, planning, or intention that exists or is thought to exist behind an action, fact, or material object Example "She designed the interface of the application to suit the users' workow."

Denition 4: implement put (a decision, plan, agreement, etc.) into eect Example "The programmer encoded the functional design as intended."