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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 30th, 2003, 08:10 AM
Grimbough Grimbough is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 Grimbough User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XSL wildcards

Hi
Im trying to process one XML file into another.
The original has horribly long tags like this:
Style = "Font: Arial; Size: 8; Italic;"
Style ="Align: Right; Size: 10; Italic;"

I want to change this to something more like:
Font = "Arial" Size="8.0" Style="Italic"

I know i can do it by using XSL to find elements with the exact attribute Style = "Font: Arial; Size: 8; Italic;"
However I was wondering if there was any way to use a wild card so i can find any element with Italic as part of the attribute and assign this to the new element.
I.e one template that would pick up "italic" in both of the above attributes and assign it to their respective elements in the new XML document.

I dont think thats very clear so please ask for clarification if it isn't understandable.
Thanks in advance.

Reply With Quote
  #2  
Old July 30th, 2003, 04:21 PM
mulligh mulligh is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 19 mulligh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Are you sure you want the style information in your XML file? This defeats the purpose of XML. Use CSS (Cascading Style Sheets) instead to control the layout of your elements.

That way, if you want to change the display of a particular element, you just change the CSS stylesheet instead of the XML source file.

Reply With Quote
  #3  
Old July 31st, 2003, 09:04 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
I concurr. The combination of xsl/css tap into the extended power of the xml as a datasource.
__________________
mr...

mike.rusaw@realpage.com
RalPage, Inc.

"I have made this letter longer than usual, only because I have not had the time to make it shorter." - Blaise Paschal

Reply With Quote
  #4  
Old July 31st, 2003, 09:14 AM
Grimbough Grimbough is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 3 Grimbough User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You are right. I was intending to use it as a method to prune completely useless information from the tags, but as you say i would then be defeating the point of using XML by leaving the styling tags in there.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSL wildcards


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 5 hosted by Hostway