Use additional tags, i.e.:

        <xsl:sort select="firstname"/>
        <xsl:sort select="lastname"/>
        <xsl:sort select="department"/>

M

-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2003 2:32 PM
To: CF-Community
Subject: RE: Why XML or am I missing something?


Oh yes, doing the sort is quite easy!  You are correct, <xsl:sort
select="firstname"/> will sort the document by first name just fine. 

My trouble is how do I allow the user to select from more then one choice?

<xsl:sort select="firstname"/>
        or
<xsl:sort select="lastname"/>
        or
<xsl:sort select="department"/>

My understanding is that you join the xsl document to the XML with the
following prolog.

<?XML version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="phone.xsl"?>
...

So how can I have multiple views? If each view requires a separate XSL
document (an ugly but not unworkable solution) how do I change which xsl
file is joined to the XML without writing 6 separate XML files?  Which then
- what would be the point?  I now have 6 files that need to be updated if
Joe Smoe changes his phone number.

I can do conditional processing in the XML file with <xsl:if
test="conditional">Code</xsl:if>.  But there is no way I can find to pass a
value into the xsl file.  It apparently doesn't have access to/read any URL
variables.

I can't imagine this is not doable?  The whole point of XML is
sharable/reusable data that can be formatted multiple ways for multiple
devices and uses.

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-----Original Message-----
From: Haggerty, Mike [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 11:15 AM
To: CF-Community
Subject: RE: Why XML or am I missing something?


Well, Ian, you can sort XML fields using just xsl, there are plenty of
tutorials on the web for this sort of stuff. I believe this is referred to
as an identity transformation, but my XML jargon is hideously poor.

If you wanted to post some code, maybe we could all help and learn something
in the process.

M

-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2003 2:05 PM
To: CF-Community
Subject: Why XML or am I missing something?


Ok, I've taken my first XML course, so I know how to create a simple XML
document validate it against a DTD or schema and then display it nicely with
either CSS or XSL.

I am now trying my first real world example, and I am finding it very
frustrating.  Anybody out there try this stuff yet.  What I want to do, is
create a company phone directory with multiple views.  I can create the XML
document with everybody's name, extension and department.  Now I want to
display this to users in a view of their choice.  I want to allow a user to
view the data sorted by last name, first name or department (with display
and printer friendly versions of each for a total of 6 views).

HOW! HOW!! HOW!!! Do I do this in XML?  This would be (and already is) a
fairly simple task in pure CFML.  Pass a variable or two into a CFM file and
rearrange the data accordingly.  But I can not figure out a way to allow a
user to choose a different view of the data and rearrange it, without
creating separate XML documents for each view and then is what the point of
the XML in the first place?

I know this a CF list, and while some of you may be using XML I don't know
if any of you are experts in and are lurking around here.  But, I'm already
subscribed to this list, so I vented here first.

Now that I'm a little calmer I'll go looking for a good XML discussion list.

Any suggestions would be much appreciated.

--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
                                

Reply via email to