 |
 |
 |
AIM:
----
* I have an xml document containing paragraphs,
an amalgamation of contracts.
* I have to extract a selection of paragraphs based
on two criteria (hyperthetical example):
(1) If our customer wants us to deliver their goods
(yes or no) therefore paragraphs explaining
Terms of delivery need to be included in their
contract
(2) And the type of contract this customer has
with us, rental, purchase or rent-to-buy
Using XLINK and XPOINTER to solve:
-----------------------------
* I have been exploring the possibility of using a control
document that based on the conditional outcome of
the criteria will define a range in the xml document
to be copied/embedded into the resulting xml document.
* I would like to enquire the viability of using XLL to
solve this problem. I have done quite a bit of reading
and have a sketchy outline of ideas.
Idea ONE:
--------
<!-- Declare a global variable determining criteria
This will probably need to be manually changed
unless there is a better way to achieve?? -->
<xsl:param name='contractType'>rental</xsl:param>
<xsl:param name='deliverUs'>true</xsl:param>
<xsl:choose>
<xsl:when
test="@contractType='rental'"
<xsl:choose>
<xsl:when
test="@deliverUs='true'"
<!-- Specify a range using xpointer
** assume I can assign an id to
an element, perhaps using the name
attribute????
** how is this xpointer syntax used with
the
xlink syntax??? I am interested in the
show="embed" and actuate="auto"
attributes of xlink -->
xpointer(id("sec2.1")/descendant::Para[last()]
to id("sec2.2")/descendant::Para[last()])
xpointer(id("sec3.4")/descendant::Para[last()]
to id("sec6.9")/descendant::Para[last()]
<!-- Am I able just to list off sections
of the original document. I want to ensure
the resulting xml is composed of fragments
of the original document not a whole
page of user activated hot spots -->
</xsl:when>
<xsl:otherwise>
<!-- ** Different sections specified - XLL
Exclude paragraphs re: delivery terms
Include all para's pertaining to
rental contract -->
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when
test="@contractType='purchase'"
...... same algorithm as above just
...... different XLL
</xsl:when>
</xsl:choose>
DTD:
----
<!ELEMENT Para ANY
<!ATTLIST Para
xlink:form CDATA #FIXED extended
href CDATA #REQUIRED
show CDATA ("new" | "replace" |
"embed") "embed"
actuate CDATA ("user"|"auto") "auto">
Idea TWO:
--------
* still endeavoring to understand the interworkings
of xlink and xpointer?? Considering out-of-line
links ?
<arguement xlink:form="extended">
<theme xlink:form="locator" href="thought1">
<theme xlink:form="locator" href="thought2">
</arguement>
<para id="thought1">
A block of text
</para>
<para id="thought2">
A block of text
</para>
Assistance with the above would be much appreciated.
Direction to clear and concise examples I would also
very much appreciate.
Thank you kindly.
Best Regards
Rhonda
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
 | 



|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |