Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. This question is answered in the XSLT FAQ. Now that you mentined it, I might make an XML one. Not now though... when I have just a bit more time. Anyway, see question 3.
  2. boen_robot

    Auto Linebreaks?

    Now the question I'm wondering is whether POSIX or Perl regular expressions in PHP are faster...Should one use function nl2brr($text){ return preg_replace("/\r\n|\n|\r/", "<br />", $text);} or is it better function nl2brr($text){ return ereg_replace("\r\n|\n|\r", "<br />", $text);}
  3. Or instead of playing a file, play a playlist file somehow. The playlist file itself will contain the references to the desired sounds. That's how I did it once upon a time. Infact, playlists were dynamically generated, but you probably aren't going to need such thing yet.
  4. boen_robot

    Auto Linebreaks?

    Does nl2br() covert all new line variants the way my example does or does it only covert \n only?
  5. <xsl:template name="pagedElement"> <img src="{image[1]/large}" title="{image[1]/description}"/> </xsl:template> That is if you want to page all first <image> elements inside each <item>.Or is it each <image> in all <item> regardless of item belonging you want to page? In that case, you need to change the paths of the "/*" template. Like this: <xsl:template match="/*"> <xsl:choose> <xsl:when test="//*[name()=$pagedElement]"> <dl> <xsl:variable name="startPoint" select="($pageNumber - 1) * $recordsPerPage" /> <xsl:for-each select="//*[name()=$pagedElement and position()>=1+ $startPoint and position()<=$startPoint + $recordsPerPage]"> <xsl:call-template name="pagedElement" /> </xsl:for-each> </dl> <xsl:if test="$disablePaginationNavigationControls = false()"> <xsl:call-template name="paginationNavigation"/> </xsl:if> </xsl:when> <xsl:otherwise> <h1>Error. No items paged.</h1> </xsl:otherwise> </xsl:choose> </xsl:template> And turn $pagedElement back to "image".
  6. By locking topics with a post, but then, mods have this right, no I personally don't judge mods (in general) for this .
  7. The thing is, the pagedElement template is targeting the element that is just below the root element that has a certain name. In your case, this has to be "item". Also, the template itself should contain a <xsl:for-each> or something to target both <image> elements or something like image[1] to target only the first.
  8. First of all, you don't need to echo the XML prolog if it's always going to be present: <?php header('Content-type: application/vnd.wap.xhtml+xml');?><?xml version="1.0"?>
  9. I don't think that's a valid attribute. Why don't simply use 'align="center"' or better yet: CSS?
  10. I can only think of one possible problem. You haven't adjusted ASP to run on XML files.Every file with .xml extension will be passed "as is" and scince the raw ASP code is making the XML ill-formed, nothing works.The solution? Rename audio.xml or whatever file contains ASP to audio.asp.If that doesn't work... well... hm... maybe the user agent doesn't support the expr attribute. Have you tried hardcoding the URL into audio.xml while keeping the expr attirubte in process_record_review.xml and run the WAV from process_record_review.xml?If that doesn't work, it's the user agen't fault and there's nothing you can do, other then dynamically generating the URL in one of the files, without pointers to the other.
  11. boen_robot

    Auto Linebreaks?

    A slightly altered example from the manual of str_replace() $str = $_POST['textbox'];$order = array("\r\n", "\n", "\r");$replace = '<br />';str_replace($order, $replace, $str); That is of course if we suppose the ID of your textbox is "textbox". This particular conversion should work no matter the OS of the client.
  12. boen_robot

    What now?

    Actually PHP can run on Windows too. It runs pretty well infact.Perl is as far as I'm aware very slow. I'm not sure how slow scince I haven't used it, but slow non the less.ASP can contain C# codes as far as I've heared. And C# is not C++, but a variation of C developed by... yup... Microsoft of course. ASP can only run under the IIS HTTP server which is made by... right again.HTML DOM is... well... how should I explain it. It's a set of standart objects for manipulating the source of HTML documents. It's not used only with JavaScript, but with other languages too. See the examples for more info.E4X is truly a sort of an update for JS, but it's not that widely implemented to think of it as part of JS' core.
  13. boen_robot

    CSS 3.0

    There isn't any. And even if there was, even if CSS3 becomes official right now, it only matters if browser vendors will implement it.
  14. According to an article on xml.com which you linked to, the "Open Mobile Alliance" suggests the MIME type you're using. So it's not exactly a W3C standart. The W3C standart is the normal XHTML MIME type of application/xhtml+xml.I suggest you use XHTML Basic and use WURFL (see the second page of the article) to add additional non-basic content which the device would be able to handle.
  15. I like the explanations you made and certanly don't protest againt them .I especially enjoyed the URI/URL/URN/IRI explanations. I wan't sure of the difference myself. The only thing I knew was that URL is a subset of URI, but didn't realized what difference does this make.Do try to shorten yourself though. I'm interested in all this, so I read it without any problems and stops for thinking. For people who are just starting with Schema, the way aspnetguy is (or was?) you have to keep it really simple, so you don't bore the reader with too much info or (as it more often happens) overwhelm it with too much info to grasp and think about.
  16. O...K.... and where do the URLs come from?If you know the answer to that, then the way you do it would be simply <td><a href="{wherever the URLs come from}"><xsl:value-of select="answer3"/></a></td>
  17. If you're short on time, you'll be best off with a CMS. In other words: a premade template, along with a managing menu for manipulating content. You may tweak the CMS' template to meet the look and feel you want.If you want to be better though, it's always best (excuse the pun) to start from scratch. The best approach... well.... the opinions on this differ and it's really a question of timing, environment and targeted audience. Scince you'll be making games, formal things like "accessability" are probably not relevant to you, as people with disabilities won't be your targeted audience. And unless you're making games for cell phones, "device independancy" won't be a priority either.So in your case, it's safe to use WYSIWYG editors and tweak the code they produce. If you're choosing this option, I suggest Dreamwaver 8 though. Don't even think about using MS Front Page.My practice on the other hand is to first make the content and mark it up, depending on it's semantics (meaning, reasons to be there).Then make a sort of "framework" to bind this page's content to a common content, such as navigation, as well as for the device independance factor. The simplest sort I would advise you to use for a first site is any sort of SSI (Server Side Include) that is available at your disposal.After that is done, I design the CSS of the page. CSS, incase you haven't read about it, is a language used to descibe the appearance of a web page. It's a lot better to use it then HTML's presentational attributesa and elements. However, I must warn you that designing CSS based layouts is hard work. You might actually be better modifying an existing one. Google for "CSS layouts" if you want to find an existing one.After the positions and all of that in the layout are done, I may also threw a few images in the CSS for attractiveness' sake.
  18. Whatever the reason, you can't really blame IE nor the CSS specification. Why? Your XHTMLs are invalid. And I don't mean only the undefined elements and attributes, but also the incomplete tables.There's probably some sort of "display: none;" in the CSS. Look for the xl24 class. It might be there. If that doesn't work... well... until you have a valid page, I really don't know.
  19. I'll stay out of the rest, because I'm really lost, but...Why on earth do you need to "echo" all that HTML with PHP? You can just have your ordinary HTML and enclose PHP code in <?php and ?>. Either way, the result is the same and echo-ing plain HTML will only be bad for performance.
  20. working url, working url, working url...link, link, link...You got the idea .
  21. How... well... do you have MS Office 2003? If so, read the previous post . It's a really boring thing to explain. Not to mention somewhat useless.I guess for the sake of reusability. If the XML changes, so does the Word document. Things will become better in MS Office 2007 though, scince the complete format is XML based. You'll be able to not only fetch content from an XML file, but also to control the appearance of the file by generating it on the fly based on XML data.
  22. Ohhh... read this tutorial or any similar one for instructions on how to install Apache, PHP and MySQL or download a package that will install it all for your. I reccomend XAMPP. See apachefriends.org for instructions to install XAMPP (even though it's almost too easy).If you've installed Apache or any other server on a PC, typing "localhost" into the browser will lead to the root of that server. If that doesn't work now, it simply means you haven't installed it or started it properly. And you need to have a web server running in order to use PHP.
  23. boen_robot

    XML & Database

    I'm wondering how to say this as nice as possible....STOP ASKING TEST QUESTIONS AND DO YOUR OWN STUDYING!
  24. In the "Getting Started" Task Pane, serach for "XML" and you'll see all the things with "Word 2003 & XML" you'll need to know.
  25. So you mean that dispite this <xs:output> element, your output file begins with <?xml version="1.0" encoding="UTF-16"?> ?Sounds really odd. And what processor are you using?
×
×
  • Create New...