Friday, May 22, 2009

XSLT to XML

Displaying XML Data

Attach the XSLT Page to the XML Page

Once your XSLT page is finished, you must attach it to the XML page. When you use Dreamweaver to attach the page, Dreamweaver inserts a link to the XSLT page at the top of the XML page.

The XML page is the page to which your site visitors will browse when viewing the page online. This is because they must browse to the "content" page containing the data (the XML file), instead of the page that contains the styles (the XSLT page).

The XML and XSL files you use for client-side transformations must reside in the same directory. If they don't, the browser will read the XML file and find the XSLT page for the transformation, but will fail to find assets (style sheets, images, and so on) defined by relative links in the XSLT page.

  1. With the xml_menu.xsl page open in the Document window, open the Bindings panel (Window > Bindings) if it isn't already open.
  2. In the Bindings panel, double-click on Schema for specials.xml to open the specials.xml file. (You must double-click the words, and not the page icon.)
  3. Select Commands > Attach an XSLT Stylesheet.
  4. In the Attach an XSLT Stylesheet dialog box, click the Browse button, browse to the xml_menu.xsl page, select it, and click OK.
  5. Click OK to close the Attach an XSLT Stylesheet dialog box.

    Browsing to the XSL file to attach an XSLT stylesheet

    Figure 16. Browsing to the XSL file to attach an XSLT stylesheet

    Dreamweaver inserts the reference to the XSLT page at the top of the XML document.

    The reference to the XSLT page at the top of the XML document

    Figure 17. The reference to the XSLT page at the top of the XML document

  6. Save the specials.xml page.
  7. Preview the XML page (not the XSLT page) in a browser by pressing F12 (Windows) or Option+F12 (Macintosh). The XML page is displayed in a browser, styled with the XSLT page you created.

    The XML page displayed in a browser, styled with the XSLT page you created

    Figure 18. The XML page displayed in a browser, styled with the XSLT page you created

    (+) View larger

Remember, your site visitors will browse to the XML page (not the XSLT page) once you've deployed both pages to your server. For more information, see About client-side XSL transformations.

DATA Displaying BY XML

Displaying XML Data

Learn About Using XML and XSL with Web Pages

Extensible Markup Language (XML) is a language that lets you structure information. Like HTML, XML lets you structure your information using tags, but XML tags are not predefined as HTML tags are. Instead, XML lets you create tags that best define your data structure. Tags are nested within others to create a schema of parent and child tags. Like most HTML tags, all tags in an XML schema have an opening and closing tag. The following example illustrates the basic structure of an XML file:

<?xml version="1.0">
<mybooks>
<book bookid="1">
<pubdate>03/01/2004</pubdate>
<title>Displaying XML Data with Macromedia
Dreamweaver</title>
<author>Charles Brown</author>
</book>
<book bookid="2">
<pubdate>04/08/2004</pubdate>
<title>Understanding XML</title>
<author>John Thompson</author>
</book>
</mybooks>

In this example, each parent <book> tag contains three child tags: <pubdate> , <title> , and <author>. But each <book> tag is also a child tag of the <mybooks> tag, which is one level higher in the schema. You can name and structure XML tags in any way you like, provided that you nest tags accordingly within others, and assign each opening tag a corresponding closing tag.

XML documents do not contain any formatting--they are simply containers of structured information. (You'll notice that the sample code contains no font, table, or heading tags.) Once you have an XML schema, you can use Extensible Stylesheet Language (XSL) to display the information. In the way that Cascading Style Sheets (CSS) let you format HTML, XSL lets you format XML data. You can define styles, page elements, layout, and so forth in an XSL file and attach it to an XML file so that when a user views the XML data in a browser, the data is formatted according to whatever you've defined in the XSL file. The content (the XML data) and presentation (defined by the XSL file) are entirely separate, providing you with greater control over how your information appears on a web page. In essence, XSL is a presentation technology for XML, where the primary output is an HTML page.

Extensible Stylesheet Language Transformations (XSLT) is a subset language of XSL that actually lets you display XML data on a web page, and "transform" it, along with XSL styles, into readable, styled information in the form of HTML. You can use Dreamweaver to create XSLT pages that let you perform XSL transformations using an application server or a browser. When you perform a server-side XSL transformation, the server does the work of transforming the XML and XSL, and displaying it on the page. When you perform a client-side transformation, a browser (such as Internet Explorer) does the work.

The approach you ultimately take (server-side transformations versus client-side transformations) depends on what you are trying to achieve as an end result, the technologies available to you, the level of access you have to XML source files, and other factors. Both approaches have their own benefits and limitations. For example server-side transformations work in all browsers while client-side transformations are restricted to modern browsers only (Internet Explorer 6, Netscape 8, Mozilla 1.8, and Firefox 1.0.2). Server-side transformations let you display XML data dynamically from your own server or from anywhere else on the web, while client-side transformations must use XML data that is locally hosted on your own web server. Lastly, server-side transformations require that you deploy your pages to a configured application server, while client-side transformations only require access to a web server.

This tutorial takes you through the steps of creating an XSLT page and performing a client-side transformation (mainly because the client-side workflow is much easier to execute, and doesn't require the use of an application server.) Once you have completed this tutorial, I recommend that you read John Skidgel's server-side transformation versoin of this article and Marius Zaharia's article on Consuming RSS feeds using server-side transformations. For more information about other ways to deploy XSLT pages, see the Learn About Other Deployment Options section at the end of this article.

Dreamweaver TUTORIAL


XML and Dreamweaver

by Kevin Ruse
June 09, 2004

While certainly not a full-blown XML editor, Dreamweaver MX 2004 includes a fair amount of support for XML. This latest release eases the web designers' transition into the area of structured markup. Many web designers using Dreamweaver rarely view their code, preferring instead to stay within the safe confines of the Dreamweaver Design View. Other designers frequent Code View often while writing JavaScript, CSS or simply because they are well-versed in HTML and prefer to write code as opposed to the WYSIWIG, drag-and-drop methods. Viewing or writing XML files will force the designer into Code View and may provide for all the functionality that's needed for web designers working with XML. This will prevent the need for the web designer to open additional software such as XML Spy, which is an excellent tool but provides for more than what is needed.

Programmers of XML applications that include XML database connectivity or those creating Web Services will indeed find full-service XML editors to be the correct choice for their toolbox. For web designers however, it may be the equivalent of learning how to use a 500w Variable Speed Keyless Chuck Hammer Drill when a screwdriver will do the job. This is not to say, however, that Dreamweaver is a mere screwdriver capable of performing only one function. The XML support in Dreamweaver combined with Flash and ColdFusion provide the means for rich internet applications including RSS feeds, Flash Remoting, Database Connectivity, Web Services and more. This article provides a summary of what can be done with Dreamweaver MX 2004 in the area of XML for the average Web designer.

Writing Well-Formed and Valid XML in Dreamweaver MX 2004

Web designers who work with XML will, foremost, want to ascertain if their documents are well-formed. Dreamweaver MX 2004 is capable of checking the file for well-formedness. The Validation tab of the Results panel allows a check for both well-formed XML and valid XML. Dreamweaver can validate a single file, user-selected files, or an entire site.

Results panel showing a validation error
Figure 1. The Results panel showing a validation error.

Another method for checking the well-formedness of an XML file is to open it in Dreamweaver and preview it in a Web browser. Netscape 7.0, Mozilla 1.0 and Internet Explorer 6.0 will return a parse-error message if your file is not well-formed.

In addition to checking for well-formed XML, Dreamweaver MX 2004 can validate XML documents against DTDs (other schema technologies are currently not supported). If the XML file has an associated DTD, the Results Panel will display validity errors as shown in Figure 1. Dreamweaver can also validate against a supplied DTD in addition to its built-in DTDs for XHTML 1.0 Transitional and Strict.

Related Reading

Learning XML
By Erik T. Ray

Table of Contents
Index
Sample Chapter

Read Online--Safari Search this book on Safari:
 

Code Fragments only

XML and Dreamweaver MX Templates

Dreamweaver offers two primary ways of incorporating XML in your web sites. The first method, to be used at design-time only, is to use templates (.dwt files). Templates hold the basic static sections of a web site; including site navigation, copyright statements, and so on. Templates include editable regions, which web authors use to add content. When a new Web page is created using a template, the static regions appear as defined by the template ensuring the integrity of the site design. Templates also allow for rapid global changes, because editing the original template file will cause the changes to propagate to each Web page created via the template.

Once a page is created based on a template, XML can be imported into the template's editable regions, provided the region names match elements in the XML file.

XML and Server Side Technologies in Dreamweaver

The second method for incorporating XML data to your Web site is through server side technologies such as ColdFusion, ASP or JSP. This removes the design-time-only restriction imposed by templates. Using these server side technologies to access XML, however, requires working in "Code View". Thus, there are no dialog boxes, wizards or other forms of prompting the user for the requisite information. Therefore, the developer must be well-versed in the language utilized by the server-side technology.

Server-Side XML Processing with ColdFusion

An obvious choice for server-side technology for DreamWeaver users is ColdFusion. Using ColdFusion to access XML files requires following these basic steps while in code view:

  1. Load the XML file:

    <CFSET MyXmlFile = ExpandPath("name_of_file.xml")>

    This declares a variable called MyXmlFile and sets it to the results of the ExpandPath() method, which returns the path of the XML file supplied as the argument.

  2. Read the XML file:

    <CFFILE ACTION="READ" FILE="#MyXmlFile#" VARIABLE="MyXmlCode">

    This reads a text file from the server. The "file" attribute points to the file to be read using the MyXmlFile variable declared above. At this point the variable MyXmlCode contains a text string of the XML file on the server.

  3. Parse the XML file:

    <CFSET MyXml = XmlParse(MyXmlCode)>

    This sets a variable, MyXml, to the result of the XmlParse(). This result is a DOM (Document Object Model) tree.

Searching XML Documents

The following script illustrates searching through an XML document and outputting the search results to the Web browser.

<cfscript>
MyXml = XmlParse(MyXmlCode);
selectedElements = XmlSearch(MyXml, "Tag_A/Tag_B/Tag_C/*");
for (i = 1; i LTE ArrayLen(selectedElements); i = i + 1)
writeoutput(selectedElements[i].XmlName & " = " &
selectedElements[i].XmlText & "<br />");
</cfscript>

Figure 2. ColdFusion Script for searching XML

The main business of the search is done with the XmlSearch() method. This method accepts as an argument the XML DOM object to be searched and an XPath expression. In the example code in Figure 2, the elements being searched are all the children of Tag_C (indicated by /*), where Tag_C is the child of Tag_B, which is the child of Tag_A.

The code will then loop through all of the searched elements and output the child element's name, and its text contents.

After you write the server-side code you can return to Dreamweaver's WYSIWYG "Design View". You can then access the live XML data as it would appear to the Web browser after processing by the Application Server. This view is accessed via the "Live View" button on the "Document Toolbar| (see Figure 3), from the View menu in the main menu bar (View a Live Data), or the keyboard equivalent "Control-Shift-R".

Toolbar with the 'Live Data' button
Figure 3. The Toolbar, with the "Live Data" button circled.

Directly Outputting XML

As well as using the writeoutput function as explained above, XML DOM objects can be more directly referenced in ColdFusion code. This requires first the loading, reading and parsing of the XML file as explained above. The next step simply uses the ColdFusion output tag <cfoutput> to display the XML content, which is surrounded by the # symbol. Thus, with reference to Figure 2, the contents of Tag_C would be output to the Web page as follows:

<cfoutput>
#MyXml.Tag_A.Tag_B.Tag_C.XmlText#
</cfoutput>

If you wish to process the individual children of Tag_C, you must loop over them:

<cfloop index="c" from="1" to="#ArrayLen(MyXml.Tag_A.Tag_B.Tag_C)#">
#MyXml.Tag_A.Tag_B.Tag_C[c].Tag_D.XmlText#
</cfloop>

ColdFusion can also query XML files in a similar way to databases. Using a loop we can create a query of the XML file using the ColdFusion QueryNew() function.

<cfset numProducts = ArrayLen(MyXML.Product.XmlChildren)>
<cfset productInfoQuery = QueryNew("ProductName, Size, Weight, Price") >

<cfloop index="i" from = "1" to = #numProducts#>
<cfset temp = QueryAddRow(productInfoQuery)>
<cfset ProductName = QuerySetCell(productInfoQuery, "ProductName",
#MyXml.Catalog.Product[i].ProductName.XmlText#)>
<cfset Size = QuerySetCell(productInfoQuery, "Size",
#MyXml.Catalog.Product[i].Size.XmlText#)>
<cfset Weight = QuerySetCell(productInfoQuery, "Weight",
#MyXml.Catalog.Product[i].Weight.XmlText#)>
<cfset Price = QuerySetCell(productInfoQuery, "Price",
#MyXml.Catalog.Product[i].Price.XmlText#)>
</cfloop>

Like any database query, the results of this query can be used to display data in the website. ColdFusion can also be used to set the values of form fields dynamically, allowing for the creation of a dynamic search based on the users' parameters.

Conclusion

You can see through this introductory look, that Dreamweaver MX 2004 is capable of rudimentary work with XML and is often all a Web designer needs. The XML files created, viewed, edited and validated in Dreamweaver can then be accessed via the ColdFusion Markup Language. However, Dreamweaver falls short in comparison to XML editors such as XML Spy which include many more capabilities. Yet for the Web designer, who occasionally sees or creates XML files, and needs to edit or validate them, Dreamweaver MX 2004 is just the job. If you need to process XML for output, Macromedia ColdFusion as well as Macromedia Flash MX 2004 can be a good place to start.

Friday, May 15, 2009

Upload menggunakan ZIP

Cara Efektif Upload File

December 3rd, 2008  |  Published in Web Hosting

Di artikel sebelumnya kami telah menulis panduan untuk mengupload file, baik melalui File Manager cPanel juga melalui FTP Client FileZilla. Ada beberapa keunggulan dan kekurangan dari masing-masing cara tersebut. Misalnya saja dengan File manager di cPanel lebih simple untuk mengupload beberapa file saja sekalian bisa mengedit file tersebut. Namun kita akan kesulitan jika mengupload banyak file dan dengan ukuran yang besar. Menggunakan FTP Client kita mengupload banyak file sekaligus, tapi tidak semua bisa menggunakan fasilitas tersebut. FTP Client menggunakan port 21 yang mana tidak semua ISP atau admin jaringan membuka port tersebut. Lalu bagaimana jika kita akan mengupload banyak file, tapi dengan cara yang cepat dan praktis? Kami buka sedikit tips untuk mengatasi masalah tersebut.

Syarat yang dibutuhkan untuk bisa melakukan cara praktis tersebut adalah di komputer anda sudah terinstall program kompresi file. Kalau di windows kita bisa menggunakan program Winzip atau winrar untuk mengkompresi file menjadi .zip. Dalam contoh kali ini saya menggunakan sistem operasi linux untuk mengkompresi beberapa File menjadi .zip. Silahkan menuju folder yang akan di upload, lalu blok semua file dan folder yang akan di kompresi. Sebagai contoh, saya tampilkan screenshot mengkompres file/folder di linux.

Di contoh tersebut saya mengkompress instalasi untuk wordpress dimana di folder wordpress terdapat beberapa file dan folder. Saya masuk ke folder wordpress, kemudian blok semua file dan foldernya, baru saya kompress menjadi .zip.

Setelah file kompresi.zip selesai, silahkan anda buka cPanel atau FTP Client. Upload file kompresi.zip tersebut ke lokasi yang anda inginkan. Setelah file kompresi tersebut sudah di server (account hosting anda), silahkan masuk ke File manager. Masuk ke lokasi dimana tadi anda mengupload file kompresi.zip, klik kanan filenya dan pilih ekstrak file seperti pada gambar berikut.

Proses upload selesai dalam sekaligus

Wednesday, May 13, 2009

FILE PROTECTIONS

IIS Directory and File Protection

MS IIS - Access by Window Authentication (OS users) only!

  • Allow access to web files via Windows Authentication (Tested w/ IIS v5.0).  When the user hits the web page a Windows Authentication login screen will appear.
    • Launch IIS (Internet Information Services)
    • Find the directory that you want to protect - probably under "Default Web Site"
    • Right click on the directory and choose "Properties"
    • Click the tab "Directory Security"
    • Click "Edit" under the section "Anonymous access and authentication control"
    • Authentication Mode
      Blank – Anonymous access (uncheck this !!!)
      Blank – Basic Authentication
      Check – Integrated Windows authentication.
    • OK
    • Apply, OK
    • Testing - If you test from the server, then you already have Windows Authentication.  You may want to test from a workstation and access via a browser.
    • Directory Security - if you are still having issues, you may want to use Win Explorer on the server and look at the Directory security permissions.  Using Windows Explorer right click on the directory, the Properties, then "Security".  (FYI - Usually you should not need to play with these settings - just IIS's settings).

MS IIS - directory protection software via ISAPI filters.

For the products that I have tested/used you can email me if you want talk:  (www.michael-thomas.com - then look for an email link)

Note:  http://localhost or http://127.0.0.1 is your local IP address if testing on your PC.

  • Search Engine Key Words

  • Testing Issues with ISAPI Filters
    • .wmv - I've had issues with these type files.
    • .swf - I've had issues with these type of files.
    • .pdf - I've had issues with Adobe v6.  v7 seems to work.
    • "By Referrer" - seems to have issues with .wmv, .swf files and possibly .pdf.  I think the reason why is tied to the client requesting additional bytes without sending the "By Referrer" info.
  • http://www.iisprotect.com - Quote from there site "iisPROTECT password protects all file types: .jpg, .gif, .pdf, .mdb, .txt, .asp, .aspx .htm .anything!  Independent of NT security, iisPROTECT uses its own database or can easily tie into an existing database."
    • I have used this product to secure content (on multiple servers) based on a user having logged into a Web Application.
    • Form Based Cookie Login: Enable - set this to enable. 
    • The "By Referrer" filter has issues with .swf and .wmv files.  (Use the "Allow" option and then enter the allowed IP addresses.)
      • .swf - hangs with IE.
      • .wmv - has issues with certain "codec" versions of WMPv10, IE and IIS.  I could never pin down the solution.    I also tried the following tags:  object & embed.
    • The Filter "IP" filters by the IP address of the client's connection to the internet (see By Referrer for from what IP did the link originate.)
    • Filter & AutoLogin Options:  Domain, IP (client's IP), User Agent, Referrer.
  • http://www.flicks.com
    • WebQuota - works with IIS.
      • The "By Referrer" has issues with .swf and .wmv files.
        • .swf - hangs with IE.
        • .wmv - has issues with certain "codec" versions of WMPv10, IE and IIS.  I could never pin down the solution.  I also tried the following tags:  object & embed.
  • http://www.iismods.com - free open source software.
    (Note:  I never could get this product to function in my environment.)
    • Mod Auth Lite
    • Mod Auth Standard - Mod Auth Lite plus database and MD5 support.

MS IIS - (Windows Media Server)

  • Notes
    • Search Engine Key Words

    • Notes
      • DRM (Digital Rights Media) -
        • http://www.microsoft.com/windows/windowsmedia/knowledgecenter/technicalarticles.aspx - Info on DRM.
        • Windows Media Rights Manager - licenses and keys are used to protect content.
        • Windows Media Encoder - enables content owners to protect digital media content during the content creation process.  Quote from MS, "In order to play back protected content, a user must have the corresponding license. This separate license "unlocks" the content and determines how the content can be used. For example, a license for promotional content might allow a user to play the content five times, or the license for rental content might expire after three days.  The license is issued by a third-party license provider. Before you can protect your content, you must set up an account with a license provider and establish the business model and terms of the licenses for the content."
          http://www.microsoft.com/windows/windowsmedia/howto/articles/ProtectContent.aspx - excellent info on how DRM works.
      • Codecs - Quote from MS: "Codecs enable content authors to specify the bit rate of a stream, which, when coupled with the duration of that stream, determines the size of the resulting file. Codecs also provide the flexibility to adjust the way encoded video and audio content looks and sounds."
  • http://www.flicks.com
    • VideoQuota - works with Windows Media Services web server.
      • Warning: This product caused WMS to quit serving out content in my testing.  I uninstalled VideQuota and WMS started working again.

Active Directory Users CFC

Pull user info out of Active Directory for Flex

So I have been working on a project for creating a Company Directory in Flex and wanted to pull the data about employees out of Microsoft's Active Directory.  I chose AD because this seems to be the most up to date info about employees and their status as employees. Some employee databases don't get updated right away when someone get hired/fired, but AD sure does due to it's security model on the network.  People need to login on their first day, and Managers want them locked out on their last.

Upon doing some research a few years ago on this subject I saw that ColdFusion had an LDAP tag built-in and could query AD relatively easily.  I decided to once again go this route and create a CFC that would query Active Directory, and Flex could just call using Remote Object.

Some of the challenges with using AD is that I wanted it to be easy for Admins to populate AD the way they've always done it and feel most comfortable.  This means using the Active Directory Users and Computers dialog forms within Windows.  The problem here is that not every field I wanted, even though it may be in Active Directory, is available within the dialog forms.  Some of the workarounds I came up with was to populate the un-used fields that already exist in the dialog but use them for other purposes.  For example on the General tab there is a field called "Web Page"...so no one at this company has their own webpage,and this is usually just left blank.  I decided to put the employee photo filename here, and have Flex work it out to pull the image directly from the server using this information.  Also, DOB is not included in any of the forms, so I had to add this to the Notes field and preceed it with "DOB:" and let Flex parse it out and convert it to a date.

Despite the shortcomings of Microsoft, this CFC and Flex does a really good job at getting this info and it's really fast!  I think the ultimate in customization would be to have a Flex Users admin screen where we can just populate AD directly and add in any custom fields we want into AD, including a raw ByteArray field for images.

<cfcomponent extends="Service">
   
<cffunction name="getEmployees" access="remote" returntype="query">
<!---This function will bomb in Flex if the defaults below are not set properly--->

<!---************CHANGE DEFUALTS BELOW**************--->
<!---Replace with your Domian name--->
<cfparam name="domain" default="YOUR_DOMAIN">
<!---Replace with your Domian Controller name--->
<cfparam name="server" default="YOUR_ACTIVE_DIRECTORY_SERVER_NAME">
<!---Replace with an Administrative AD account--->
<cfparam name="username" default="Administrator">
<!---Replace with account password --->
<cfparam name="password" default="ADMINPASSWORD">
<!---Replace with your specific LDAP port number if different from MS default--->
<cfparam name="port" default="389">
<!---************END OF DEFAULTS***See Below for more options--->

<!---OK, Ready?...Try to get employee data from Active Directory--->
<cftry>
<cfldap action="QUERY"
    name="ldapquery"
<!--- Most popular fields pulled from AD Users you can add more if you wish. View AD schema with any LDAP viewer --->
    attributes="sn,givenname,initials,title,department,company,ipPhone,telephoneNumber,mail,physicalDeliveryOfficeName,wwwhomepage"
<!---Look in Users containter only, Bitch--->
    start="cn=users,dc=#domain#"
<!---Used to filter AD...looks at "Office" field in AD Users (physicalDeliveryOfficeName) and pulls record if populated with "DCC"  Change as nessesary.  userAccountControl makes sure to only select users who are NOT(!) disabled in AD.  Looks crazy, but we're talking Microsoft here--->
    filter="(&(objectclass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)) (physicalDeliveryOfficeName=DCC))"
    sort="givenname"  <!--- Sort records by First Name.  Change fields as nessesary or comment out for "random" results--->
     server="#sever#.#domain#"
    port="#port#"
    username="#domain#/#username#"  
    password="#password#">                 

        <cfcatch type="any"> <!---If LDAP query fails for any reason...execute this and return 0 records.--->
            <cfset UserSearch = "Failed">
            <cfset ldapquery.RecordCount = 0>
        </cfcatch>
</cftry>
    
    <cfreturn ldapquery>  <!---Return data back to Actionscript--->

</cffunction>    
</cfcomponent>

-Christopher C. Keeler

Monday, May 11, 2009

Corousel Horisontal

Carousel Lite - A jQuery plugin August 9th, 2007

jCarousel Lite is a jQuery plugin that carries you on a carousel ride filled with images and HTML content. Put simply, you can navigate images and/or HTML in a carousel-style widget. It is super light weight, at about 2 KB in size, yet very flexible and customizable to fit most of our needs.

Did I mention that it weighs just 2 KB?

As if that wasn't enough, the best part is yet to come… You don't need any special css file or class name to get this to work. Include the js file. Supply the HTML markup. Then, construct the carousel with just a simple function call.

Visit the project page for more information. There you can find a lot of demos and exhaustive documentation. This blog entry is just a teaser for further exploration.

Installing and getting it to work is as trivial as following the 3 steps given below…

Step 1:

Include a reference to the jQuery library and the jCarouselLite plugin. If you like interesting effects, include the Easing plugin as well (Optional). If you would like to navigate the carousel using mouse wheel, then include the mouse-wheel plugin as well (Optional).

<script type="text/javascript" src="path/to/jquery.js"></script>
<script type="text/javascript" src="path/to/jcarousellite.js"></script>
<!-- Optional -->
<script type="text/javascript" src="path/to/easing.js"></script>
<script type="text/javascript" src="path/to/mousewheel.js"></script>

Step 2:

In your HTML file, provide the markup required by the carousel (a "div" enclosing an "ul"). You also need the navigation buttons, but these buttons need not be part of the carousel markup itself. An example follows…

<button class="prev"><<</button>
<button class="next">>></button>
<div class="anyClass">
<ul>
<li><img src="someimage" alt="" width="100" height="100" ></li>
<li><img src="someimage" alt="" width="100" height="100" ></li>
<li><img src="someimage" alt="" width="100" height="100" ></li>
<li><img src="someimage" alt="" width="100" height="100" ></li>
</ul>
</div>

Step 3:

Fire a call to the plugin and supply your navigation buttons. You just managed to architect your own carousel.

$(function() {
$(".anyClass").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev"
});
});

If you have any comments/suggestions/requests, feel free to drop in a comment or you can find me lurking around the jquery mailing list.