|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
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 |
|
#4
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL wildcards |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|