SunQuest
           XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 24th, 2003, 04:40 AM
furious5 furious5 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 12 furious5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML Begineers Q's

Ok I've read quite a bit about XML on and off for a year or so, but have shyed away from it until now.

I am currently working on a personal project which I have decided to use XML.

Now I have a few questions about XML specifically:

1 - How do I include the & symbol in my documents
2 - How do I link to external sites as I would in a HTML doc?
3 - I have a field in the XML doc named date, I want to sort the date field by date ASC, but how would I specify this in the XSL?

My next query really centres about how everything fits together, at the moment I have a HTML doc, CSS, XML, XSL.

Obviously the HTML, CSS will provide the presentation, XSL will provide the HTML formatting but how do I display the XML date in the HTML doc - do I need to use a Server Side Language and if so how?

Sorry for all the questions.

Reply With Quote
  #2  
Old July 24th, 2003, 09:29 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
1. & a m p ; (*without the spaces)
2. you'll have to come up with a node structure and apply an xsl template to it that builds the appropriate html code ("< a href...")
3. take a look at implementing <xsl:sort> it will do what you need.
4. You can pass in the value into the
stylesheet as a parameter. Assuming you are using MSXML/ASP:
Code:
'ltransform XML and output
   Set xslTemplate.stylesheet = xslDoc
   Set xslProc = xslTemplate.createProcessor()
   xslProc.input = xmlDoc
   xslProc.addParameter "parameter_field_name", mstrValueOfParamter
   xslProc.Transform

Reply With Quote
  #3  
Old July 24th, 2003, 09:55 AM
furious5 furious5 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 12 furious5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the reply, some of it is a little lost on me as I am still getting to grips with XML so pardon my ignorance.

1 - ok tried that yesterday, and it didn't seem to work. Resolved now?

2 - Huh?

3 - Used <xsl:sort select="date"/> but it didn't sort by ascending date. Any further ideas on this?

4 - Huh? Care to give me a couple of links to some examples of full code?

Reply With Quote
  #4  
Old July 24th, 2003, 10:18 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
1. so you got this fixed?
2. i meant "node" to refer to an element structure in your xml that has additional elements inside:
Code:
<doc>
  <node1>
    <para>Text1</para>
  </node>
  <node2>
    <para>Text1</para>
  </node>
</doc>   


You'll then need an xsl tht does something like:
Code:
<xsl:template match="node">
   <a href="url">
      <xsl:value-of select="."/>
   </a>
</xsl:template>

3. Note: <xsl:sort> is always within <xsl:for-each> or <xsl:apply-templates>. View this example: http://www.w3schools.com/xsl/el_sort.asp

4. Again this assumes that you are using MSXML 3.0: http://msdn.microsoft.com/library/d...ddparameter.asp

Last edited by mrusaw : July 24th, 2003 at 10:23 AM.

Reply With Quote
  #5  
Old July 24th, 2003, 10:46 AM
furious5 furious5 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 12 furious5 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cheers for that.

I'll have a bit more of a look in to my questions, and get back to you if I need any more assistance.

Reply With Quote
  #6  
Old July 24th, 2003, 10:59 AM
mrusaw's Avatar
mrusaw mrusaw is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Dallas, Texas
Posts: 138 mrusaw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to mrusaw Send a message via Yahoo to mrusaw
you got it... i hope that helped.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML Begineers Q's


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway