This is a discussion on "XML with CSS Formatting" within the Web Page Design section. This forum, and the thread "XML with CSS Formatting are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
XML with CSS Formatting
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
XML with CSS Formatting
Hi All
I am new to this forum and need some urgent help. In fact, any help would be greatly appreciated! I am doing a university degree and this is part of my current assignment on XML formatting using CSS. It has baffled me for the past week and having Googled, asked around ..etc I have a major problem in that no one seems to like the idea of using CSS with XML. Couple that with lack of any detailed websites on using CSS with XML. Having asked some guys at work they seem more interested in XSLT than CSS but I still need to do this assignment or else ... Basically, I am given a simple XML file (sample-request2.txt - please see the file in the attachment) and we are asked to format it according to the SUMMARY DISPLAY and FULL DISPLAY layouts according to the specification (explained in detail in Format Layout.html) My biggest problem is how to specify the CSS attributes for the following attributes: customer-reference, customer-name and request-reference I have tried doing the following: <code>product-availability-request.customer-reference { . . . }</code> IT DOES NOT WORK ! <code>product-availability-request[customer-reference] { . . . }</code> IT DOES NOT WORK ! In fact when I did the following CSS : <code>/* This .CSS file is used with sample-request2.xml file */ product-availability-request { display: block; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 12pt; background-color: white; color: blue; } product-availability-request[customer-reference] { color: red; }</code> All I get is the following : 15/12/2006 17/12/2006 UK Essex SS15 6EE Technical Centre, Laindon, SS15 6EE Special order for alloy wheels to go on new RS model under development 100 17" RSR Shadow Chrome 17" Hybrid Shadow Chrome 15" Hybrid Shadow Chrome 300.00 200.00 Which as you can see does not include the contents of the 3 attributes that I've mentioned (customer-reference, customer-name and request-reference). This is meant to be a simple CSS formatting but so far I have not even begun the race !! As I said, ANY help (references to other websites, forums ..etc) would be greatly appreciated. Kind Regards Zak |
|
|
|
#2
|
|||
|
|||
|
Re: XML with CSS Formatting
Zak, there are definitely people on this forum who could help you with this, but are you sure you're allowed to ask for such specific help when this is part of a degree assignment which is (presumably) meant to be all your own work, and (presumably) counts towards your final degree mark? None of my business I know, but I work for a University so I know how this could be seen. Just wanted to be sure you'd thought about that.
|
|
#3
|
|||
|
|||
|
Re: XML with CSS Formatting
I agree with Vanessa 100%. But I will give you a shove in the right direction. The rest is up to you. Although, the people you talked to are right, XSLT is the preferred way to do what you are trying to do.
XML & CSS Good Luck, Scott
__________________
Web Design and Development |
|
#4
|
|||
|
|||
|
It seems that I have certainly "offended" a number of people out there
Trust me my intention was NOT for anyone on this or other forums where I placed the same specific question to give me the A-Z solution. I would not have wanted that in the first place. If you read the post, I had a specific question about a specific function in CSS and a specific example which now I know is called attr(). That's all .. Fortunately, in the end it was one of the other students on the same degree course who actually spoted my dilemma simply because he was in the same spot at some time who then 'hinted' to the right command in CSS that opened up the heavens and I managed to finish the assignment within the same day. I am disappointed somewhat to the feedback that I got from people out there whom I thought would have the knowledge in CSS to actually give me a 'hint' as to the appropriate function in CSS which would have helped me to start and then complete the assignment. One hard lesson that I have learnt is that not to waste my time again looking for help externally (please dont be offended) but to concentrate my effort to communicate within my closed group of students at uni So, please the next time someone asks a simple question, go easy on the guy/gal instead of preaching and being all goody-goody .. specially the ones who happen to work for a uni. No worries, this is my last post .. Regards Zak [One Day, All of This Will Be History] |
|
#5
|
|||
|
|||
|
Re: XML with CSS Formatting
I would have thought a student completing an independent project would be allowed to get information from wherever he or she deems appropriate. This is simply research, he doesn't know something so he is finding out about it. Nothing wrong with that, in fact it shows a willingness to learn which is definitely something university courses should be fostering. Well at least they should be but we all know it is the degree that matters and not the experience. Anyway in future I would suggest that posters either try to help or don't bother depending on your moral stance but don't preach to people. Webforumz is here to help people who are struggling with web design related issues, nothing more nothing less. He didn't ask you to do it.
Zak, I've done a little research into this myself, if you don't want to post again, PM me and I'll try and help you out. Pete. |
|
#6
|
|||
|
|||
|
Re: XML with CSS Formatting
Hi again Zak
You said that was your last post so I don't know if you'll come back and read any responses, but I have to respond anyway! First of all, I'm really sorry if I in any way made you feel unwelcome on the forum, that wasn't my intention, and I didn't mean to come across as preachy or goody-goody. I was genuinely trying to be helpful by suggesting that what you were doing COULD be seen as cheating (I'm not suggesting that was your intention at all). But a lot of people do cheat in their university assignments as you know, and universities now actively seek out to catch people cheating - again, to clarify, I don't at all believe that you were trying to cheat, I understand you were having a specific genuine difficulty and were using what resources you could to try and solve that. BUT there is a very fine line between discussing general topics and problems related to your course (which is fine), and asking for a specific solution to an assignment problem, and I've seen people get awarded a zero grade for a particular assignment if it's deemed that they stepped over that line. If you were sitting in an exam, you wouldn't expect to be able to ask the person sitting next to you how to do something, or phone someone for help, and the course assignments should be seen in a similar way. Of course, as Pete says, fostering research skills in students is a key function of universities and that is of course why assessment is not just by exam, but with assignments that necessitate students researching answers, which certainly involves the internet, and yes, discussing topic areas with others. It could of course be perfectly acceptable on your course for you to do what you did, I'm not saying with 100% certainty that it's wrong, which is why my original post was in the form of a question: 'Are you sure you're allowed...'. My feeling was just that asking for that kind of help on such a public platform COULD be risky, and I stand by that. Again, please don't feel that this forum can't be of help to you on your course, it definitely can be a support and can help you get the real world perspective on your studies, and again, sorry if I came across as unhelpful/unwelcoming/preachy/moralistic, my intentions were good, really they were. |
|
#7
|
|||
|
|||
|
Re: XML with CSS Formatting
Quote:
|
|
#8
|
|||
|
|||
|
Re: XML with CSS Formatting
Well you practically called the guy a cheat and now we have lost a member. You didn't even offer any advice. You posted just to point out that you didn't think he should be asking what he did. You both offended and patronised him. Though I don't suppose it matters anymore.
Pete. |
|
#9
|
|||
|
|||
|
Re: XML with CSS Formatting
Pete, believe it or not I actually (stupidly I now realise) thought I might be doing him a favour by pointing out that what he was doing COULD be seen as cheating, I meant absolutely no offence. For you to blame me for losing a member is a bit much; you've no idea whether he would have continued as a member after that query was answered or not. I on the other hand clearly am a member who is sticking around and yet the fact that I might have been caused some offence here obviously doesn't matter.
I'm really sorry if I've caused any trouble |
|
#10
|
|||
|
|||
|
Re: XML with CSS Formatting
I never blamed you for losing a member. And like I say, it doesn't rerally matter now.
Pete. |
|
#11
|
|||
|
|||
|
Re: XML with CSS Formatting
Vanessa is a wonderful member here and has a wealth of knowledge to share and has been doing so for some time now. If her original post offended rightly or wrongly, she apologized. That's good enough for me. If the OP doesn't accept the apology that his problem.
Thread closed. |
|
#12
|
|||
|
|||
|
Re: XML with CSS Formatting
This thread has went way too far in my opinion. I will be contacting all members concerning this thread shortly. Thanks!
|
![]() |
| Tags |
| css, formatting, xml |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| innerHtml doesn't retrive the formatting from DIV | shamail | ASP.NET Forum | 0 | Aug 24th, 2007 20:02 |
| text formatting questions | Lchad | Web Page Design | 7 | Jan 27th, 2007 23:05 |
| Text formatting trouble | BGarner | Web Page Design | 4 | Jan 8th, 2007 11:47 |
| XSL FO Table formatting | davedran | Other Programming Languages | 0 | Dec 13th, 2006 07:35 |
| Formatting not working | masonbarge | Webforumz Suggestions and Feedback | 4 | Jun 26th, 2006 14:41 |