[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Creating a Complex System using XSLT. Step 1: Create Feedback


butterly effect
Such type of problems are generally solved by the "iter" and "iterUntil"
templates of FXSL.

"iter" iterates a function a given number of times. "iterUntil" iterates a
function until some condition (constraint) has been met.

The solution is natural and reflects a well-formulated and well-understood
problem.

The "within" template can be used to capture "converging" behaviour. It
iterates a given function until the difference between two consecutive
results becomes less than a given range.

There are many examples, demonstrating the use of these templates in FXSL.
They have been successfully used to solve many problems of this kind.

A solution to your problem will be straightforward once the "step-function"
and the "constraining function" have been precisely defined.

I would be glad to help -- please, do not hesitate to contact me.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL



"Roger L. Costello" <costello@m...> wrote in message
3F89B9C0.4570554A@m...">news:3F89B9C0.4570554A@m......
> Hi Folks,
>
> I would like to see if collectively we can create a complex system
> using XSLT.  Several people have been hinting at doing this.
> Now let's do it!
>
> I thought that a good first step in building a complex system would be
> to learn  how to create "feedback".  Let me start by defining feedback.
>
> Suppose that the "system" is a Fitness Center. Let's see how feedback
> may enter into a Fitness Center system:
>
>             1. New people join the Fitness Center.
> +  +>   2. This results in increased revenue.  With the new money
> +             the Fitness Center purchases more equipment.
> +         3. The new equipment attracts more people to join. +
> + + + + + + + + + + + + + + + + + + + + + + + + + +  +  +
>
> This feedback loop is "amplifying" (increasing):
>    - the number of members
>    - the total revenue of the Fitness Center
>    - the amount of equipment.
>
> This is called "positive feedback".  Positive feedback means that big
> things have a tendency to get even bigger, e.g., big Fitness Centers
> get bigger, big newspapers get bigger, etc.
>
> The amplification will reach a steady state once the Fitness Center has
> as much equipment and members as it can hold, given the size of the
> building they are in.  Thus, the size of the building imposes a
> "negative feedback" on the system, keeping it from expanding
> indefinitely.
>
> The initial stimulus which resulted in the system entering into the
> feedback loop was that some new people joined the Fitness Center.
> A small change in the system resulted in a big overall change;
> aka The Butterly Effect.
>
> Now let's relate this to XML and XSLT.  The Fitness Center is
> modelled using XML:
>
> <FitnessCenter>
>     <Members>
>         <Member level="platinum">
>             <Name>Jeff</Name>
>             <MembershipFee>$500</MembershipFee>
>         </Member>
>         <Member level="gold">
>             <Name>Stacey</Name>
>             <MembershipFee>$350</MembershipFee>
>         </Member>
>         ...
>     </Members>
>     <TotalRevenue>$75,000</TotalRevenue>
>     <Equipment>
>         <Item>Cybex Leg Extension</Item>
>         <Item>Hammer Strength Lat Row</Item>
>         ...
>     </Equipment>
> </FitnessCenter>
>
> How can we design our XSLT stylesheet to exhibit feedback?  One
> thought might be to create a stylesheet which "simulates" the growth of
> the Fitness Center:
>
> FitnessCenter.xml --> FitnessCenter.xsl -->  newFitnessCenter.xml
> Parameter: New Members List
>
> The stylesheet inputs the FitnessCenter XML document along with a
> stylesheet parameter that contains a list of new members.  The
> stylesheet then simulates the feedback loop by generating new
> <Equipment> items, which then results in creating new <Member>
> elements, which results in generating new <Equipment> items,
> which then results in creating new <Member> elements, etc.  The
> output XML document shows an updated Fitness Center with more
> members, a larger total revenue, and more equipment.
>
> However, I don't feel that such a "simulation stylesheet" would be a
> good example of feedback for this reason:
>
>    - XSLT is not really a simulation language.  If the purpose is to
>      run a simulation then it would probably be better to use a
>      language explicitly designed for simulations.
>
> So how can we write a stylesheet which exhibits feedback and takes
> advantage of what XSLT is good at - processing XML documents?
> Answer: I don't know.  I am hoping that collectively we can arrive
> at a good example.
>
> Here are some thoughts: the above example shows the feedback loop
> amplifying the member count, the total revenue, and the equipment
> count.  Perhaps that's the wrong thing to focus upon.  That is focusing
> upon the Fitness Center.  Perhaps instead the focus should be on the
> stylesheet itself.  Perhaps some aspect of the stylesheet should get
> amplified, e.g., perhaps the output of the stylesheet is another
> sylesheet which is "amplified" with more template rules.  I don't know.
> I have run into a wall.  I am hoping that someone can help me to be
> break through the wall and see the light.  /Roger
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
>
>




PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.