Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. There isn't a rule for defining what properties are inherited and what not. That's defined in the CSS specification itself.Some of the properties that are inherited include font (all), text (all), color, direction, letter-spacing and maybe few more.
  2. Have you tryed removing the namespace for "diffgr" in the XSLT and declare it only in the XML?Do other XML&XSLT pairs work with this "XML retreival" code (though if I understand correctly, this is your XSLT processor)?
  3. Well, I guess the specifications could only suggest a default stylesheet that Browsers should follow. For example, <p> is always rendered as a block element and <span> always as inline one.But even those are just suggestions. What the HTML specification describes in detail is only the semantics of documents and as such, their behaviour. For example, the fact that <button> shows a button is defined in the specification. How the button looks by default is defined by the vendor.
  4. Well, this XML is very plain. What should the output URLs looks like? If we suppose they are relative links to the ouput file which need to be like "manufacturer/model", then you can simply use AVT, like: <xsl:for-each select="car"><a href="{manufacturer}/{model}"><xsl:value-of select="concat(manufacturer,' ',model)"/></a></xsl:for-each> More complex situations requre either specfying the URL somewhere within the XML or assemblying it with conditions in the XSLT.
  5. If the form is processed with PHP, you can use the htmlspecialchars() function. Other server scripts have their own methods.
  6. Well, can OxygenXML perform a single transformation with a batch of XML files? If so, then simply use that function and save the files to your PC and then, add them to the application server. Of course, using this method means that for every change in the XSLT, the batch of XML files will have to be transformed again and reuploaded to the server.
  7. Much better then before. You have used most of the markup suggestions I gave you already. Few spacers and you'll be completely CSS compilant .The first and most important thing that I can comment on is that the images on the first menu (Home, Pastor, etc.) are a bit... in frame. They have a black background. I think they should have a transparent one instead or the black should go all the way to the right border. Currently it looks kind'a... out of place.The part: <a id="top"></a><div id="header"></div> Seems useless. For linking people to the top, you can use only "#" without a name as link or simply use your "content_all" if you insist on having something. The header image is one of the things you may use <img> for within the layout. Scince you're using an empty <div>, that's more of a "should" then "may" for you.I think your upper "Back to top" (right after "Photo Gallery") should be placed at the end of the whole navigation (right after "Other Links") instead.For the sake of accessability, you might want to add "Skip navigation" and "Skip links" links, placed just before those items and hide them with CSS. Along with the "back to top" links, such "CSS hidden" links are especially usefull for mobile phones who will probably use a different stylesheet.Can you add "Verse of the Day" inside the JavaScript that calls the actual content? when JS is disabled, the prase stays, but with no Verse whatsoever. Saving the user from thinkink (s)he did something wrong would be good (though whoever is smart enough to turn JS off is smart enough to know when sites behave badly because of the lack of JS).
  8. You can add such things in the XML file, but there isn't going to be much point in them. It all depends on what processes the XSLT and the XSLT itself. I know that server side scripting languages can save files, but they save them on the specified server location, not the client .How exactly do you process your XML file?
  9. Yes. Any language that can deal with XML documents can deal with XHTML document as if it's an XML document. So let's say you want to grab all links' URLs. With a complex and rather weird regular expression you would achieve that, but there may always be some sort of leak. If the XML parser was used, an XPath expression like //a/href would serve perfectly and flawlessly for that job. But if the document is not a well formed XML document, this wouldn't work.
  10. The easyest alternative you can take is to use XSLT. When you reach value-of (pretty much the first thing you'll learn) use the XPath expression in the select attribute and enjoy the result.
  11. boen_robot

    xpath question

    You can test XPath expressions by simply creating an XSLT file to style the XML and use the XPath expression in a value-of. How to do that? Normally, I would have offered code, but for your quiz's sake... read.
  12. Most of the other question you've asked here were obviously grabbed from a quiz book or... god knows what. I'm not going to reply to theese things for obvious reasons, but scince you've at least now given what you think, I will say that I think you may think right.
  13. boen_robot

    ASP n SVG

    I don't think there's a way. I recently started using Adobe Illustrator and exported a graphic into SVG. It used text on many lines (automatically placed on new line or manually moved below with ENTER) and looking at the source showed only <text> elements.
  14. The point is for them NOT to upload things on your server, but have it on their own, yet share it's capabilities with others. When they need a change they do it and everyone else uses the new function instantly.Constructing a SOAP server and client however is not exactly a straight process. When I have the time and nerves to make a site of mine, I would probably post some "how-to"s for this there. Until then... dunno. Share functions the old fasion way I guess.
  15. Yes. It will work. As with most of the other similar stuff, the "type" attribute at the processing instruction makes the difference. So<?xml-stylesheet type="text/xsl" href="whatever"?>Will always attempt to read the file in the "href" attribute as an XSLT file and as you said, scince XSLT processing is done on the client in this case, the client actually gets the needed XSLT code instead of the server side script code.
  16. Well, you can always add a conditional in the cell like this: <xsl:for-each select="*[position()=6 or position()=8 or postion()=26]"><td><xsl:if test="whatever you want to exclude by"><xsl:value-of select="."/></xsl:if></td> But that's probably not the most comfy and flexible thing. And it still relies on position() too.Without it... hmm... I'm not sure, but I think this might work just as well: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><table><thead><tr><xsl:for-each select="plist/dict/dict/dict/key[.='Artist' or .='Album' or .='Year']"><td><xsl:value-of select="."/></td></xsl:for-each></tr></thead><tbody><xsl:for-each select="plist/dict/dict/dict"><tr><xsl:for-each select="key[.='Artist' or .='Album' or .='Year']"><td><xsl:value-of select="following-sibling::*[position()=1]"/></td></xsl:for-each></tr></xsl:for-each><tbody></table></body></html></xsl:template></xsl:stylesheet> And you can add new columns by just adding them to the "key[.=Artist' or .='Album' or .='Year]" parts. And adding filters to them is just as easy. If you want to add a filter only for specific key, you would make it like: key[boolean(.='Artist' and string(following-sibling::*[position()=1])='whatever artist you want to filter by') or .='Album' or .='Year'] And if you want to add overall filter (applicable to any key) then.... press any key... haha.... just little computer joking . Anyway... if you want any key filter, then use the boolean() function over all keys, not just one: key[boolean(.='Artist' or .='Album' or .='Year') and string(following-sibling::*[position()=1])='whatever you want to filter by'] P.S. Actually, there are still a few things that I can't handle properly with XSLT. XPath axes are one of those things, so I'll be a little surprised if my above code works flawlessly.
  17. boen_robot

    parse xml?

    Normally, a single XML document may look like this: <?xml version="1.0"?><Document><publication><property name="PU" value="aaaaa"></property><property name="PD" value="aaaaaaa"></property><property name="PG" value="aaaaaa"></property><property name="HD" value="aaaaaaaa"></property><property name="TX" value="aaaaaaa"></property></publication><publication><property name="PU" value="b"></property><property name="PD" value="bb"></property><property name="PG" value="bbb"></property><property name="HD" value="bbbbb"></property><property name="TX" value="bbbbbbbbb"></property></publication></Document> or this: <?xml version="1.0"?><Document><publication><property name="PU" value="aaaaa"></property><property name="PD" value="aaaaaaa"></property><property name="PG" value="aaaaaa"></property><property name="HD" value="aaaaaaaa"></property><property name="TX" value="aaaaaaa"></property></publication></Document> If all of your code above is the complete content of an XML file, then the complete contents with the XML prolog (the top line) would be like: <?xml version="1.0"?><Document><publication><property name="PU" value="aaaaa"></property><property name="PD" value="aaaaaaa"></property><property name="PG" value="aaaaaa"></property><property name="HD" value="aaaaaaaa"></property><property name="TX" value="aaaaaaa"></property></publication></Document><Document><publication><property name="PU" value="b"></property><property name="PD" value="bb"></property><property name="PG" value="bbb"></property><property name="HD" value="bbbbb"></property><property name="TX" value="bbbbbbbbb"></property></publication></Document> If that is so, then any attempt to parse this XML with whatever language would fail, because that XML document is not well formed or in other words, it doesn't follow the XML rules. There can only be one element that holds others within it. That element is called a root element. In all of the previous examples <Document> is the root element. However, the last example has two <Document> elements, not one.You may have one <Document> nested inside another one, but you can never have two <Document> elements as the root element.Another thing you must understand is that XML files aren't just "attached". They need to be read (parsed) by some language (it's not a fixed one) and that language then uses the data for something (showing it for example). That "something" is also defined by the other language itself.Read the XPath tutorial and the XSLT tutorial. Part of the XSLT tutorial also shows how to execute an XSLT transformation inside an ASP page. Alternatives in other languages are also avaiable (I'm just saying...).
  18. Yeah. I recently stumbled upon it too. Can't remember from where exactly. And... it sucks.I hate the fact that I can't see the raw source code.Previweing the output of XSLT transformations would have impressed me if I hadn't already been able to use PHP and Cold Fusion's XSLT processors.Moving the elements from one point to another is a good feature, but I'm personally feeling more comfortable when moving code pieces.The error list is another good feature, but without source code view, what's the use of it? You can't make a mistake anyway.And the most irratating thig is the way different nodes are presented. They are all tree-like structured. I like to think of attributes as pointers and elements as childs. So instead of:-Root--Text-of-the-root--Arrtibute-to-the-root---Text-of-the-attribute-of-the-root--Element---Arrtibute-to-the-element----Text-of-the-attribute-of-the-element I prefer to think of an XML document as: -Root--Arrtibute-to-the-root | Text-of-the-attribute-of-the-root--Element--Arrtibute-to-the-element | Text-of-the-attribute-of-the-element
  19. You haven't looked hard enough. this page has all you need. Like HTML links, WML ones can link to any file, including 3GP videos.
  20. Yes you can.No, the extension doesn't need to be .xslt. Infact, most XSLTs use .xsl extension but that's not requred either.I know that PHP grabs the raw content of the file (I don't know about ASP), so it's not even necessary to have a file. You can generate the XSLT inside the server script and run the XSLT processor at that point (before the XSLT reaches the client).
  21. boen_robot

    parse xml?

    So what exactly is the problem here? Other then the fact that you have two root elements I mean.If your problem is exactly that, then just try: <Document><publication><property name="PU" value="aaaaa"></property><property name="PD" value="aaaaaaa"></property><property name="PG" value="aaaaaa"></property><property name="HD" value="aaaaaaaa"></property><property name="TX" value="aaaaaaa"></property></publication><publication><property name="PU" value="b"></property><property name="PD" value="bb"></property><property name="PG" value="bbb"></property><property name="HD" value="bbbbb"></property><property name="TX" value="bbbbbbbbb"></property></publication></Document>
  22. Theese "1"s are confusing me a bit... anyway...How to send N values... hm... let's see. You can always add extra parameters and check against them with an "or" like so: <xsl:if test="$num1=. or $num2=."> But I guess that's not what you want now, right?I will think about this. It's a really curious thing and I think I might have a hunch.I'm not sure I understand the trouble with role1. Variables are converted to a string, so you can never expect a variable to return a node-set to compare against. And considering the construction of the template, I suppose you get "111111" or more "1"s. One for each cd which price starts with "8". Correct? I still don't see the clear point.
  23. Fill it up with content for starters . Installing additional modules such as PHP and MySQL is an option, but it's not requred .
  24. If you want this file to be public, you can simply place it in the folder and give a link to it. Most hosts should allow you to place all sorts of content on your site, so placing an exe or rar shouldn't be a problem.I you need to offer it to only a selected group of people, it gets harder. You need either a host that will offer you a custom FTP service, or .htaccess and .htpasswd abilibites for HTTP authentication. In any way, having your own server is the best way to go for this.
  25. Creating a new forum system is a really complicated process and you can't do it right now. The way to it is too long.Using an existing forum system is easyer though. Such systems have an admin interface that allows you to add categories, promote members to mods, etc.One such system is Invision Power Board which you're using right now. Other systems include phpBB, vBulletin and others.
×
×
  • Create New...