Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. The reason W3Schools didn't add it is because the minumum document doesn't requre exactly a paragraph. It could be any block level element. Div, h*. I think lists are also allowed.Perhaps it would be better if they use: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Title goes here</title></head><body><!--Body text goes here--></body></html>
  2. talk about hosting... uh...
  3. boen_robot

    RSS Feed

    Have you tryed the RSS tutorial on the first place?If you don't want to learn the syntax, you could use google to find some RSS generators.
  4. If you ask me, it's clear who will participate. It's us, the regular users... the helpers. Most newbies just come and go. If any of them wanted to participate, they would have posted in this topic until now.
  5. If a book has multiple authors, simply define "authors" element to contain them. In other words- group similar elements. There's no need to call an element "author_first_name" if it's always going to be inside an "author" element. Stuff that has functional purpose, but not any informal one, such as IDs, should be included in attributes. Otherwise, you'll need to tell the XPath expression get's a lot complicated. If IDs are based on position (1 for 1st, 2 for 2nd and so on), you might not want to add an ID though. XPath can select things based on their position. I also like to avoid "_" in element names in general, but that's just a personal preference. Every data that is language independant (numeric mostly) should be left independant. For example, turn "4th" to "4", and use XSLT to add "th" in engligh or another suffix for other languages. Another example are month names. Write them in numbers, under their own node (element or an attribute... which one is better is a question of a large debate). If a certain element is empty and doesn't serve any special purpose, the way "editor" is, it should be omitted instead. You can use conditions to perform different actions based on the node's existance, but it's (not hard, but) stupid to perform action based on a test if an element is empty. So to sum it up: <book> <title>Learning XML</title> <authors> <author> <firstName>John</firstName> <lastName>Johnson</lastName> </author> <author> <firstName>Frank</firstName> <lastName>Ladder</lastName> </author> </authors> <yearPublished>2005</yearPublished> <publishingCompany>Red River Publishing</publishingCompany> <pages>450</pages> <edition>4</edition></book> With a structure like this, the XPath expressions you'll have become self explaining and straight. For example:Show the authors who's first name is "John". //book/authors/author[firstName='John'] Show every person that contributed to the book, who's name is "John". This of course applies only if we assume each "editor" element is also going to have "firstName" and "lastName" elements like the "author" element. //book//*[firstName='John'] Show the title of each book which's pages are less then or equal to 600. //book/title[pages <= 600] Show the title of each book with an editor. //book[editor]/title
  6. Let's not get cocky, shall we?Or... I can tell you that "word of a sentence" is a valid prase, but it implies different meaning then yours, which is more appropriate for the situation anyway.Also, I think "good" is more appropriate then "well" in this case, but then again, they both have the same meaning so it's not that big of a deal.[edit] Yes, as I said, your suggested correction is more appropriate, and as you said, it's probably what he meant. My point was that "word of..." is also not wrong. Just different. And yes, good point that "f" and "r" are just above each other in the QWERTY keyboard standart, used in most countries (as far as I'm familiar with). I have the same type of keyboard [/edit]
  7. No you won't... read above! The trial will degrade to the Developer Edition, which still allows you to design and test your code. It only doesn't allow you to serve your pages to more then 2 IPs at a time, meaning it's not suitable for a live application, but it's useful for development as it's name implies.Why weren't you able to install it? What happened? Details are missing again .
  8. Well, um... what exactly was the problem? Where did occur? Details, details...
  9. What I'm trying to say from the start is that you can't convert a JavaScript variable to XSLT one. Not only that, but you can't use JavaScript values with XSLT in any way. You can however convert XSLT variable/parameter to a JavaScript one, and/or you can use JavaScript to adjust a parameter's value, thus influence on the output. You must rethink your approach to the thing you're trying to achieve... whatever it is (I still can't grasp it. I need markup).
  10. Yeah right. And if only one person is avaiable in time zone... (s)he'll leave a message? The point is to chat after all.
  11. Just look at this topic. It's filled with lots of editors, or "IDE"s if you prefer.
  12. Well, um... Yes. In it's core, every styled XML document is one big bunch of data. In order to be styled, the whole XML must be loaded.Every XML is unique, so it's hard making reusable templates, unless you just notify the user hat certain XSLT applies to theese types of structures, and not on those.If the document that you're trying to (re?)use has a structure in the lines of: <a><b>...</b><b>..</b></a> Then the paging XML is a good place to start.If it's more complicated (as is most probably) it will requre something a bit more creative. But I wouldn't mind investigating it if I see it.
  13. Well, the script I showed you activates when called (either with a click on link with approariate href, or in a script).You could add the select attribute with a default value though:<xsl:param name="pass" select="'some value you want to use as a default one'"/> If you've adjusted the script properly, the parameter should be changed on the appropriate event. Note that the selected value must match exactly the content of the element you're aiming at. For example: <xsl:param name="pass" select="'Emancipation Day'"/>
  14. Try to place the <xsl:param> element as a top level element. In other words, outside a template. Something like: <xsl:stylesheet version="1.0" ...><xsl:param name="pass"/><xsl:template match="/">...</xsl:template></xsl:stylesheet>
  15. Most XSLTs make the information human readable. Besides, what do you have in mind by "human readable"? What I have in mind is "XHTML page". Any piece of XML and desired XHTML output? I could make one for you if it's not that much complicated.
  16. Try saving your document as Unicode big endian, instead of UTF-8 or Unicode.To do so in Notepad, click Save As and in the encoding drop down menu select "Unicode big endian". Of course, you should also select "All files" and type in the exact name, but I bet you already know that.
  17. Well, the reason for your problem is in your description of it: XSLT expects an XSLT variable/parameter or a direct node set (XPath expression). It can't process variables from another language.What you can do is to store the pass as a XSLT parameter, and use that parameter's value instead.<xsl:param name="pass"/>function showCountries(pass){ var results =''; var sendtoDIVid = "requests"; switch(pass) { case pass: results +='<p style="color: Navy">Countrys</p>'+ '<p style="color: Navy">'+pass+' 2006</p>'+ '<ul>'+']]><xsl:for-each select="Holidays/Days/Data[Holiday = $pass]"><![CDATA['+ '<li style="color: navy">'+']]><xsl:value-of select="Country"/><[CDATA[</li>'+ ']]></xsl:for-each><![CDATA['+ '</ul>'+ '</table>'; document.getElementById(sendtoDIVid).innerHTML = results; break; default: }}]]></script> then, in the output, you need to make a call to another function, which will change that parameter's value. When that value is changed, so is the value of this script. this post demostrates a JavaScript function that is going to change the parameter. I'm not good at JavaScript, so I can't adjust that script for you.
  18. Well, you certainly don't have a "Holiday" element, which value is eaxctly '+pass+' and that's your problem.What exactly are you trying to achieve?
  19. Is the XML well-formed otherwise?Does it work with "UTF-16" or "UTF-8" encoding instead?
  20. You should use the <object> element to embed a sound or movie into the XHTML page. Other elements such as <embed> are not standart ones, which is why they are not listed in W3Schools' references.
  21. Aren't we going VERY offtopic here? Oh... I knew this would happen.Besides, he already said: By the way, here's an idea: try to rename the class names so that they don't start with a number. For example use "a1" instead of "1".
  22. Oh well... if my idea isn't going to be included, I might as well vote.I voted for a CMS (1 part at a time) because I think there isn't a way a full CMS can be acomplished in 3 weeks. The other projects like RSS reader and Guestbook are sort of CMSs too, so the same applies to them.For a manager I can only say I didn't voted for myself and like Jonas, I must say I never said I wanted to be a manager, but as said above, I don't really mind it .[edit]After reading the post below mine, I'm starting to regret my vote. The paging XML could easily be optimized to page RSS feeds, thus being integrated in the final application. There's even already a script to change the proper parameters. The missing part is integrating the script so it works from an (X)HTML page, and to make the JS function in a way which will allow it to manipulate every parameter. Some styling (again) is also requred, so there's work for CSS people too.Oh... Can I change my vote?[/edit]
  23. And why wasn't my idea of a project included? I mean "gallery/catalog" or is it included as part of the "blog" concept?By the way, I never suggested I should be manager. I'm honored to be nominated .
  24. At your home or in the near Gas Station? .What Choco means is "Please don't poo and um... make water in this topic by writting silly posts in it". I'm almost sorry I had to poo here just to say that .[edit] I know. I'm just fooling around... that's what I meant with my last sentence [/edit]
  25. All the stylers really need is the output of the XSLT transformation and that isn't much of a problem.And the server side scripters only need to know the XSLT specific functions of their language of choise + be aware how each parameter should be validated. Even now, I can tell you that $recordsPerPage, $pageNumber must be a number and the $disablePaginationNativation*** can only be "true()".For the admin panel, the server people would need to know more, but then again, if they didn't, this would have been a piece of cake.As for the authentication... hm... that's a better point. XML files are definetly not secured for such things. Perhaps hardly coded in (another) PHP file, but still changable via the script?
×
×
  • Create New...