XSLT (Docbook)

M

MGG

Hi,

Can anybody help me to create a xslt for the following xml matter.

<orderedlist numeration="arabic">
<listitem>
<para>An insurance policy paid 12 months in advance is treated as an
asset because</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>it is a cost incurred by the business.</para>
</listitem>
<listitem>
<para>the business has a debt to the insurance company.</para>
</listitem>
<listitem>
<para>the policy has a future economic benefit to the business.</para>
</listitem>
<listitem>
<para>the policy is an item of value owned by the business.</para>
</listitem>
<listitem>
<para>it must be reported in the statement of financial
position.</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Which of the following is a correct application of the accounting
equation?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>A = L - OE + R - E</para>
</listitem>
<listitem>
<para>OE = L - A + R - E</para>
</listitem>
<listitem>
<para>A = L + OE + E - R</para>
</listitem>
<listitem>
<para>OE = A - L + R - E</para>
</listitem>
<listitem>
<para>A = OE - L + R - E</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Accounting records should be able to be checked against business
documents to
satisfy which qualitative characteristic of accounting?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>comparability</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
<listitem>
<para>relevance</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>understandability</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Accounting principles support the qualitative characteristics of
accounting. From
the following list, select the pair that support one another.</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>relevance and historical cost</para>
</listitem>
<listitem>
<para>materiality and entity</para>
</listitem>
<listitem>
<para>reliability and conservatism</para>
</listitem>
<listitem>
<para>reliability and historical cost</para>
</listitem>
<listitem>
<para>materiality and reporting period</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Historical cost means:</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>the history of a business can be checked with reports from a
number of periods.</para>
</listitem>
<listitem>
<para>the current value of assets can be verified with business
documents.</para>
</listitem>
<listitem>
<para>using the original accounting methods from one period to the
next.</para>
</listitem>
<listitem>
<para>assets are recorded at the price at which they were originally
purchased.</para>
</listitem>
<listitem>
<para>being on the safe side when recording cost prices of
items.</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A business owes $100 on balance day for advertising completed
during the
period but no adjustment has been made for advertising owing. What
affect does
this have on the firm's accounting equation?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>assets overstated, no effect on liabilities, owner's equity
overstated</para>
</listitem>
<listitem>
<para>assets understated, no effect on liabilities, owner's equity
understated</para>
</listitem>
<listitem>
<para>no effect on assets, liabilities overstated, owner's equity
understated</para>
</listitem>
<listitem>
<para>no effect on assets, liabilities understated, owner's equity
overstated</para>
</listitem>
<listitem>
<para>assets understated, liabilities understated, no effect on
owner's equity</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A business owner has a debtor who owes him $200. Last weekend the
two of them
met by accident at a weekend football match. The business owner
reminded the
debtor about the debt and he promptly paid the owner the $200, using
cash from
his wallet. The owner kept the cash for himself and did not bank it
into the business
account. What is the affect of this event on the accounting equation of
this business?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>increase assets, no effect on liabilities, increase owner's
equity</para>
</listitem>
<listitem>
<para>increase assets, increase liabilities, no effect on owner's
equity</para>
</listitem>
<listitem>
<para>decrease assets, decrease liabilities, no effect on owner's
equity</para>
</listitem>
<listitem>
<para>decrease assets, no effect on liabilities, decrease owner's
equity</para>
</listitem>
<listitem>
<para>no effect on assets, increase liabilities, decrease owner's
equity</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A business owner made the following statement: 'Everything must
be recorded
for my business, but not everything has to be reported.' Which
qualitative
characteristic or accounting principle might the owner be thinking of
when
making the above statement?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>understandability</para>
</listitem>
<listitem>
<para>conservatism</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>historical cost</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A proprietor used the straight-line method of depreciation for
her vehicles in the
first year (Year 1) of business operations. A friend told her that
reducing balance
is the preferred method for vehicles so she changed to this method in
Year 2. This
method was quite confusing for the owner and so she reverted to
straight line in
Year 3. Which qualitative characteristic of accounting may have been
breached
by this business owner?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>comparability</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
<listitem>
<para>relevance</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>understandability</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>The premises of a business were originally purchased for $200 000
a number of years
ago. However, the property was recently valued at about $300 000. What
qualitative
characteristic demands that the premises be revalued for reporting
purposes?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>comparability</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
<listitem>
<para>relevance</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>understandability</para>
</listitem>
</orderedlist>
</listitem>
</orderedlist>


thanks in advance
 
T

Tjerk Wolterink

MGG said:
Hi,

Can anybody help me to create a xslt for the following xml matter.

<orderedlist numeration="arabic">
<listitem>
<para>An insurance policy paid 12 months in advance is treated as an
asset because</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>it is a cost incurred by the business.</para>
</listitem>
<listitem>
<para>the business has a debt to the insurance company.</para>
</listitem>
<listitem>
<para>the policy has a future economic benefit to the business.</para>
</listitem>
<listitem>
<para>the policy is an item of value owned by the business.</para>
</listitem>
<listitem>
<para>it must be reported in the statement of financial
position.</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Which of the following is a correct application of the accounting
equation?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>A = L - OE + R - E</para>
</listitem>
<listitem>
<para>OE = L - A + R - E</para>
</listitem>
<listitem>
<para>A = L + OE + E - R</para>
</listitem>
<listitem>
<para>OE = A - L + R - E</para>
</listitem>
<listitem>
<para>A = OE - L + R - E</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Accounting records should be able to be checked against business
documents to
satisfy which qualitative characteristic of accounting?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>comparability</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
<listitem>
<para>relevance</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>understandability</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Accounting principles support the qualitative characteristics of
accounting. From
the following list, select the pair that support one another.</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>relevance and historical cost</para>
</listitem>
<listitem>
<para>materiality and entity</para>
</listitem>
<listitem>
<para>reliability and conservatism</para>
</listitem>
<listitem>
<para>reliability and historical cost</para>
</listitem>
<listitem>
<para>materiality and reporting period</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>Historical cost means:</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>the history of a business can be checked with reports from a
number of periods.</para>
</listitem>
<listitem>
<para>the current value of assets can be verified with business
documents.</para>
</listitem>
<listitem>
<para>using the original accounting methods from one period to the
next.</para>
</listitem>
<listitem>
<para>assets are recorded at the price at which they were originally
purchased.</para>
</listitem>
<listitem>
<para>being on the safe side when recording cost prices of
items.</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A business owes $100 on balance day for advertising completed
during the
period but no adjustment has been made for advertising owing. What
affect does
this have on the firm's accounting equation?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>assets overstated, no effect on liabilities, owner's equity
overstated</para>
</listitem>
<listitem>
<para>assets understated, no effect on liabilities, owner's equity
understated</para>
</listitem>
<listitem>
<para>no effect on assets, liabilities overstated, owner's equity
understated</para>
</listitem>
<listitem>
<para>no effect on assets, liabilities understated, owner's equity
overstated</para>
</listitem>
<listitem>
<para>assets understated, liabilities understated, no effect on
owner's equity</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A business owner has a debtor who owes him $200. Last weekend the
two of them
met by accident at a weekend football match. The business owner
reminded the
debtor about the debt and he promptly paid the owner the $200, using
cash from
his wallet. The owner kept the cash for himself and did not bank it
into the business
account. What is the affect of this event on the accounting equation of
this business?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>increase assets, no effect on liabilities, increase owner's
equity</para>
</listitem>
<listitem>
<para>increase assets, increase liabilities, no effect on owner's
equity</para>
</listitem>
<listitem>
<para>decrease assets, decrease liabilities, no effect on owner's
equity</para>
</listitem>
<listitem>
<para>decrease assets, no effect on liabilities, decrease owner's
equity</para>
</listitem>
<listitem>
<para>no effect on assets, increase liabilities, decrease owner's
equity</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A business owner made the following statement: 'Everything must
be recorded
for my business, but not everything has to be reported.' Which
qualitative
characteristic or accounting principle might the owner be thinking of
when
making the above statement?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>understandability</para>
</listitem>
<listitem>
<para>conservatism</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>historical cost</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>A proprietor used the straight-line method of depreciation for
her vehicles in the
first year (Year 1) of business operations. A friend told her that
reducing balance
is the preferred method for vehicles so she changed to this method in
Year 2. This
method was quite confusing for the owner and so she reverted to
straight line in
Year 3. Which qualitative characteristic of accounting may have been
breached
by this business owner?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>comparability</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
<listitem>
<para>relevance</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>understandability</para>
</listitem>
</orderedlist>
</listitem>
<listitem>
<para>The premises of a business were originally purchased for $200 000
a number of years
ago. However, the property was recently valued at about $300 000. What
qualitative
characteristic demands that the premises be revalued for reporting
purposes?</para>
<orderedlist numeration="upperalpha">
<listitem>
<para>comparability</para>
</listitem>
<listitem>
<para>materiality</para>
</listitem>
<listitem>
<para>relevance</para>
</listitem>
<listitem>
<para>reliability</para>
</listitem>
<listitem>
<para>understandability</para>
</listitem>
</orderedlist>
</listitem>
</orderedlist>


thanks in advance

no, learn xslt and docbook yourself,
i'm sure you will succeed
 
P

Peter Flynn

MGG said:
Hi,

Can anybody help me to create a xslt for the following xml matter.

You'd have to specify what you wanted the output to be (XML, HTML, some
plaintext format, PDF, etc); and if it needed rendering, what you wanted
the displayed/printed result to look like.

Your text also contains some undesirable features:

'Everything must be recorded for my business, but not everything has to be
reported.' should be <q>Everything must be recorded for my business, but
not everything has to be reported.</q> if you want proper quotation marks
to be output (see the template for "q");

The hyphens in the equations should be minus signs (and math normally
uses italic letters).

Monetary amount like $200 000 using spaces risk being split over line-ends.
Either use the comma or period (according to culture) or use a non-breaking
space (&nbsp;)

Anyway, this one produces HTML:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:eek:utput method="html"/>

<xsl:template match="/">
<html>
<head>
<title>Some financial stuff</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>

<xsl:template match="orderedlist">
<ol>
<xsl:attribute name="type">
<xsl:choose>
<xsl:when test="@numeration='upperalpha'">
<xsl:text>A</xsl:text>
</xsl:when>
<xsl:when test="@numeration='arabic'">
<xsl:text>1</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:apply-templates/>
</ol>
</xsl:template>

<xsl:template match="listitem">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>

<xsl:template match="para">
<p>
<xsl:choose>
<xsl:when test="contains(.,' - ')">
<i>
<xsl:value-of select="translate(.,'-','−')"/>
</i>
</xsl:when>
<xsl:eek:therwise>
<xsl:apply-templates/>
</xsl:eek:therwise>
</xsl:choose>
</p>
</xsl:template>

<xsl:template match="q">
<xsl:text>‘</xsl:text>
<xsl:apply-templates/>
<xsl:text>’</xsl:text>
</xsl:template>

</xsl:stylesheet>

What was your problem?

///Peter
 
M

MGG

I've made the xslt with the help of altova stylevision but i'm not able
to continue the number list for example:

1. this is number list
A. this is another list under number list
B. this is another list under number list
C. this is another list under number list
D. this is another list under number list
2. This is another entry of numer list
A. this is another list under number list
B. this is another list under number list
C. this is another list under number list
D. this is another list under number list


and i'm getting the output like this

1. this is number list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list
1. This is another entry of numer list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list

please help me to create an appropriate xslt for the same.
 
P

Peter Flynn

MGG said:
I've made the xslt with the help of altova stylevision but i'm not
able to continue the number list for example:

1. this is number list
A. this is another list under number list
B. this is another list under number list
C. this is another list under number list
D. this is another list under number list
2. This is another entry of numer list
A. this is another list under number list
B. this is another list under number list
C. this is another list under number list
D. this is another list under number list


and i'm getting the output like this

1. this is number list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list
1. This is another entry of numer list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list
A. this is another list under number list

Then you haven't shown us everything in your document.
please help me to create an appropriate xslt for the same.

The stylesheet I posted works. Have you got some intervening
data that we are not aware of? If so, you can write some XSLT
code to count the number of items in the relevant preceding
lists, and set the start-value counter of the <OL> to the
appropriate value.

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top