Jump to content


  • Posts

  • Joined

  • Last visited

About craftid

  • Birthday 02/22/1984

Previous Fields

  • Languages
    A little bit of XHTML, XML and JS

Profile Information

  • Location

craftid's Achievements


Newbie (1/7)



  1. Hey folks,I hope this is an appropriate place to ask this question. I've been working through the tutorials here on w3cschools, and am wondering about best practises, when it comes to adding new content without reloading the page.From what I gather, I can have a .txt file containing lots of html (sample below) and add that into my main page quite successfully. <div class="pagecontent"><p class="subheading">Sub Heading</p><p class="stuff">Some stuff</p></div> Everything looks correct, but I can't help feeling that having all this styled html saved as .txt files will cause me problems in the future. If I'm honest, my first concern is that using <a onclick="functionthatloadsthispage()">New Page</a> doesn't play nice with the a:link,visited,hover,active styles, but that's another post.Do any of you more experienced folks see a reason not to use .txt to store all the html?Cheers,
  2. Thank you boen_robot, this is just what I needed to get me going.Very well explained!
  3. That's great, thank you very much! You're exactly correct regarding <xs:element name="new" minOccurs="0"/>, this will be very useful. For the date format, I have to say I followed the w3schools tutorial on XML Attributes, where the "favorite" format for a date is to use all elements instead of attributes. I have no specific need for that format, so I'm happy to play around.I'll put it to practice in a few hours, and report back.Thanks again!
  4. Hey folks,I'm following the schema tutorial here on w3schools, I've hit a point where I "think" I know the correct method, but I was hoping some of you experienced folks could have a look at this.I'm trying to write a schema for this XML document. <minutes> <entry id="1"> <date> <day>16</day> <month>January</month> <year>2011</year> </date> <recap> <recapheader>Recap of last week:</recapheader> <recapcontent>Blah de blah de blah</recapcontent> </recap> <new> <newheader>New Points</newheader> <newcontent>Bluu de bluu de bluu.</newcontent> </new> </entry></minutes> I'm struggling to imagine how to write for these elements. As I understand it, I'd first use complex types and sequences to get entry,data,recap,new defined, then somehow use "xs:extension base" to further define the elements? Could anyone point me on the right track please?I'll post back later when I'm home from work and I get a chance to actually play around with this.Cheers.
  • Create New...