XML with CSS Formatting

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Jun 17th, 2007, 19:23
New Member
Join Date: Jun 2007
Location: Milton Keynes, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Attached Files
File Type: zip XML with CSS Formatting.zip (6.2 KB, 24 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Jun 17th, 2007, 19:34
Highly Reputable Member
Join Date: Apr 2007
Location: Kent, England
Age: 38
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Jun 17th, 2007, 23:26
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 155
Thanks: 0
Thanked 4 Times in 4 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Jun 22nd, 2007, 22:13
New Member
Join Date: Jun 2007
Location: Milton Keynes, UK
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs down Re: XML with CSS Formatting

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 .. interesting how all over a sudden, we are not allowed to ask these kind of questions ? doh !

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]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Jun 22nd, 2007, 23:41
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Jun 23rd, 2007, 06:38
Highly Reputable Member
Join Date: Apr 2007
Location: Kent, England
Age: 38
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Jun 23rd, 2007, 07:00
Highly Reputable Member
Join Date: Apr 2007
Location: Kent, England
Age: 38
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Re: XML with CSS Formatting

Quote:
Originally Posted by pa007 View Post
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.
Pete, I also meant to respond to what you said here. My understanding of this forum is that anyone is free to respond to any message they want, in any way they want, as long as it doesn't break Webforumz' rules. Therefore, the fact that he didn't ask me to comment in the way I did is surely irrelevant. If I'm wrong then this isn't the forum that I thought it was.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Jun 23rd, 2007, 14:46
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old Jun 23rd, 2007, 15:43
Highly Reputable Member
Join Date: Apr 2007
Location: Kent, England
Age: 38
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old Jun 23rd, 2007, 16:25
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: XML with CSS Formatting

I never blamed you for losing a member. And like I say, it doesn't rerally matter now.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
Old Jun 23rd, 2007, 16:28
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #12  
Old Jun 23rd, 2007, 21:57
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
css, formatting, xml

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 17:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42