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

Re: Best way to include code samples

Subject: Re: Best way to include code samples
From: Mark Miller <storefront2000@xxxxxxxxx>
Date: Thu, 16 Aug 2001 11:00:27 -0700 (PDT)
include code
Larry,

I worked on this problem last month and received
replies from Evan, Chris Bayes and Dimitre. I was
trying to insert a 'copy' of XSLT code as examples in
an online, XML tutorial. That way, if the code was
changed, the code samples would be automatically
updated. 

Chris has a solution he is working on, but I was not
able to get it working. 

As you saw, Evan's is a little overkill for the size
project you have. However, we did exchange a couple of
emails. His solution worked as far as inserting the
code into the example boxes, but we found out that the
document() function outputs a string, not nodes,
therefore I wasn't able to format the output properly.

Dimitre's solution was interesting, but not what was
needed.

The closest I came to getting it to work was pulling
the code in with a document() function and then
building a conversion template for each tag name in
the example. It wasn't worth the effort for the
project I was working on, so I ended up
"cutting-and-pasting" the code in the example section.

You can see how it looks by going to:
www.storefront-solutions.com/
    demos/xml-demo/courseware/toc.xml

Choose one of the chapters other than 'Overview' or
'Basics', drill down and you will see output of code
examples.

This is a tutorial system built on the fly with XSLT.
I tried to get code insertion working for the code
samples, but I finally gave up because of time
constraints. 

I still intend to get it working. Please let me know
what you end up doing.

Mark



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.