Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. You should also add overflow: hidden; I think. As far as I know, this is what's needed to keep the div from strething more then needed.
  2. That could also be usefull in browsers such as Opera for example. If you just enable the Navigation Bar you'll see what I'm talking about. Just imagine a site that fills all of the gaps there .But that still doesn't explain the rev attribute though. I too wonder myself why would a document need to specify what it is to the other one? I can't think of a single use case.
  3. Thanks for all the help. Much appreciated .Anyway, I also solved Opera's problem now. It seems that up to the current build, Opera doesn't support the document() function and because of that returns errors.As far as I'm concerned, this topic could be closed.
  4. Um, is it me, or the only thing the site contains is "Some link"? What kind of portfolio is that? Also, you might wanna consired some softer colors.
  5. boen_robot

    Definitions in XML

    There are three ways:1. Don't put it inside the (X)HTML. Make the whole page(s) with XSLT(s) and XML(s) and run the XML(s) to view the result. The most bumpy road which I wouldn't suggest relying much on.2. Use a server side script like the one on the "XSLT on the server" example at the desired spot where the XSLT transformation should be perform. You'll get the actual output of the XSLT this way. A combination of this and the previous method (use a server side script to execute a whole XSLT&XML based site) is the best method in my opinion and it is infact what some sites are doing.3. Use this JavaScript code to execute the XSLT in a desired div container. You won't get the source code and the XML data is not that searchable (by search engines I mean) scince you're using script to import it. I'm having difficulties using two copies of this script but still: it works.
  6. I seem to be unable to get any background-color to the body with XSLT and FireFox. It must be a browser bug. I reported it already. Just instead someone is interested in a workaround: apply the background properties to the html element instead.But the minimal testcase for the background worked with Opera, so the problem with it is more complicated. Any ideas on what might be the problem with Opera? I mean, there isn't even a message to show what might be wrong.
  7. boen_robot

    Definitions in XML

    Oh... at times like this I wonder when is W3Schools going to add the <xsl:variable> and <xsl:attribute> explanations. The lack of them makes XSLT look like a weak language when infact it's a lot more powerful.In order to add attributes you could use those two elements in one (or more?) of theese fashions:If the attribute always exists and it's name is known, the simplest method is <xsl:variable name="href" select="LINK"/><a href="{$href}"><xsl:value-of select="NAME"/></a> If the attribute doesn't always exist and/or it's name is unknown, you could use something simmilar to: <a><xsl:attribute name="href"><xsl:value-of select="LINK"/></xsl:attribute><xsl:value-of select="NAME"/></a> Note: the currently represented situation is going to produce the same output. Adding conditionals and variables to this however would be useful for the situation I'm talking about.
  8. The file must always be on the server of course. How could it be processeed if it's not on the server? I think what you meant was "without explicit reference in the XML"?Well, if there isn't going to be a processing instruction with the href attribute, then there must be some third language (on a third file) to connect the two files. It could be a server side script (as in the "XSLT on the server" examples) or if it must be on the client side- with JavaScript.It can't be done by simply combining the files into one, unless perhaps there is some server side script that would know which is which and apply the stylesheet as if it was a separate file. But there's no point in that. If you're going to keep the things in one file, it's better to have plain XHTML instead.
  9. boen_robot

    XML printing style

    You could use CSS to style an XML document, but that would be realy plain.You could use XSLT to transform the XML to XHTML and style it with CSS (the best method for all) but then again, most browsers have problems with different print specific properties, so it might get ocmplicated at some point.You could use XSLT in combination with XSL-FO and then use XSL-to-PDF convertor application to generate a print preview of the page. That's probably the best method for printing purposes, scince you don't care for cross browser compatabilities, but just "want the job done".
  10. OK, let's say it's a bug. If so, what might trigger it? What should I report to Mozilla and Opera?P.S. I almost can't believe IE is better then FF and Opera with this.
  11. I know exactly what you meant and if you read my post you'll see what I mean. "blocktext" could be anything you like. There are no predefined values of it.If by "type of class" you mean for the "." of it- that defines class. The only other "type of class" is ID, which is declared with "#" in the place of the ".". Example:CSS #blocktext{blah blah} HTML <p id="blocktext"></p>
  12. A class or an ID on that matter is not something defined. You think of it, so it could suit your needs. Because of that, W3Schools can't provide a "reference" of classes. A class is just a name of a group (defined by you) which takes on the defined properties and nothing more.
  13. Couldn't you have used divs with overflow:scroll?
  14. boen_robot

    Definitions in XML

    Well, the first thing you must understand is that Data Islands are not supported in browsers other then IE. After ensuring that's not a problem, note that XML files must be fully loaded before processed. If you're going to store big dictionaries, using XML on the server side or MySQL is a better solution. If you're still brave enough to go to the wrong way of data islands...Does your XML have a consistand naming scheme? For example: <glossary><definition><LINK>something.html</LINK><NAME>A</NAME><DEF>This is something</DEF></definition><definition><LINK>smething-else.html</LINK><NAME>AA</NAME><DEF>This is something else</DEF></definition></glossary> Also, note that XML is case sencetive. Are your <NAME> and <LINK> elements in the XML file written in upper case letters as witnin the XML?A better way to "link" XML data to XHTML would be XSLT, but that's definetly not as easy as the Data Island method. It does however give you a lot more benefits and it's where XML comes in handy.The advantage of storing data this way is that it's reusable. You have to edit only that data for it to appear everywhere it's used. And by everywhere I don't only mean every page but every platform as well.
  15. boen_robot

    Fixed Navigation

    If I use IE6 there's no fixed menu, so the answer must be position: fixed; on the element you want fixed (which in this case is #menu) + the coordinates themselves(top, bottom, left, right).
  16. I think what aspnetguy meant was something more of the lines...IE6 was released on a deadline and because of that, it didn't sucseeded in adding most CSS2 features support. The future IE7 (currently beta) is going to have better CSS2 support (note: no one said anything for "complete").
  17. rel describes what's the other document to the current. rev describes what's the current document to the other one. The opposite of rel in other words.The perfect example of what I mean would be human relationships. A person next to you might be your father for example. That's what he is to you. You are his son. That's what you are to him.
  18. Because I'm getting bored theese days, I decided I try to make myself a site. I never thought I would encounter an issue when I wanted to make my candidate site flexible by using my favourite language- XSLT. I'm almost embarrased to ask my question, but I can't find a plausable answer myself, so here it goes...I used Piefecta's PageMaker to generate myself a good layout, instead of starting from scratch. I know it's not something that one should really do, but I though that scince I'll be using XSLT, there won't be any worries for what the XHTML nor the CSS is- I would still be able to redo the whole site without moving a single finger on the per-page contents.So far, so good. I put some of the contents in their own XML files, and copied the rest in an XSLT template.When ran on IE it's all fine, when ran in FF I see everything but the body's background color (WTF?) and Opera 9 gives "XSLT Processing failed" which is rather odd.The XSLT(layout.xsl): <?xml version="1.0" encoding="windows-1251"?><!-- DWXMLSource="index.xml" --><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="windows-1251"doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/><xsl:template match="/"><html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><!-- The above DOCTYPE and html lines and the meta http-equiv line below the head are critical. DO NOT DELETE them --> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>Your Page Title Here</title> <style type="text/css" media="screen"> @import url("css/noodle_real.css"); @import url("css/style.css"); </style><!-- import with quotes and brackets hides css from:Netscape 4.xWin IE 3Win IE 4Mac IE 4.01Mac IE 4.5Konqueror 2.1.2Win Amaya 5.1isn't that nice to know? --> <xsl:comment><xsl:text disable-output-escaping="yes">[if IE]></xsl:text> <style type="text/css"> @import url("css/IEstyle.css"); </style> <xsl:text disable-output-escaping="yes"><</xsl:text>![endif]</xsl:comment> </head> <body> <div id="fullheightcontainer"> <div id="wrapper"> <div id="outer"> <div id="float-wrap"> <div id="center"> <div id="clearheadercenter"></div> <div id="container-center"> <xsl:copy-of select="."/> </div> <div id="clearfootercenter"></div> </div> <div id="left"> <div id="clearheaderleft"></div> <div id="container-left"> <xsl:copy-of select="document('navigation.xml',/)"/> </div> <div id="clearfooterleft"></div> </div> </div> <div id="right"> <div id="clearheaderright"></div> <div id="container-right"> <xsl:copy-of select="document('additional.xml',/)"/> </div> <div id="clearfooterright"></div> </div> <div class="clear"> </div> </div> <div id="gfx_bg_middle"> </div> </div> <div id="header"> <div class="outer_horiz_border"> </div> <div id="subheader1"> <p> This is Sub-Header #1 (with Fixed Height) </p> </div> <div class="outer_horiz_border"> </div> </div> <div class="clear"> </div> <div id="footer"> <div class="outer_horiz_border"> </div> <div id="subfooter1"> <p> This is Sub-Footer #1 (with Fixed Height) </p> </div> <div class="outer_horiz_border"> </div> </div> </div> </body></html></xsl:template></xsl:stylesheet> style.css /******************************************Copyright Notice: Parts of these notes are© Owen Briggs @ www.thenoodleincident.com(for the font css file) © Big John @www.positioniseverything.net and © PaulO'Brien @ www.pmob.co.uk, all of whomcontributed significantly to the design ofthe css and html code.All other content is © ClevaTreva Designs******************************************//***XXXXXXXXXXXXXXX Primary layout rules XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXTo change many of the widths/heights requires that other certain values mustalso be changed at the same time. For this reason, beside these criticalattributes (or nearby if comment hacks do not allow) are comments with thecalculations as to how to adjust them.These guidance comments start with /*** and end with ***//***You can delete these if you want, but do not delete MAC Hack comments (seebelow).To change the width of the entire layout, adjust the columns that make up thetotal, remembering the borders. Remember, even one small mistake will degradeor even break the layout, so be very careful!For spacing within the cols, it's best to apply margins on content elementsinserted into the cols, because padding directly on those col elements willchange their widths, breaking the layout.Certain hiding hacks have been used extensively in this layout, so here is aquick explanation of them.The Safari escape tab hack:*************************** (used on wrapper, and the 3 backgrounds for Mozand Opera).Puts an escape in front of a valid number in the style name to replace aletter in that name, e.g. \65 is an e. A tab is then inserted (not a space).The purpose of this hack is to hide some code from Safari. Unfortunately,some other browsers (like IE) see it for what it should be (but NOT Safari),and so we must undo the code for those browsers by other hacks.The Tan hack:************** html .anyelement {rules read only by IE/Win and IE/Mac}The MAC hack:*************(first the active comment you are reading now must beclosed...) ***//* \*//* *//***...Back in comment mode now. Anything between those two comment lineswill be hidden from IE/Mac. Don't use any comments within this hack or it willclose prematurely and IE/Mac will begin reading before it should.The above two hacks are combined so as to feed rules only to IE/Win.The Holly Hack:***************Proper use of backslash escape characters inside property names used in theHolly hack can further segregate rules to be read by only IE6 from rules forIE5.x/Win.These hiding hacks, along with several other fixes, make possible this formerlyimpossible layout. It is highly unlikely that new browsers will have anyproblem with these valid hiding hacks, and we will have to wait for Microsoftto release IE7.If enabled in the PageMaker, the 100% height in the html and body styles makesthe design full height. It also breaks Moz because you should use min-height,but that doesn't work! Notehow these 100% heights are hidden from IE Mac withthe MAC Hack, otherwise they break it.XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX ***/html,body{ margin:0; /*** Do NOT set anything other than a left margin for the pageas this will break the design ***/ padding:0; border:0;/* \*/ height:100%;/* Last height declaration hidden from Mac IE 5.x */}body{ background:#33CCFF; min-width:782px; /*** This is needed for moz. Otherwise, the header and footer willslide off the left side of the page if the screen width is narrower than the design.Not seen by IE. Left Col + Right Col + Center Col + Both Inner Borders + Both Outer Borders ***/ text-align:center; /*** IE/Win (not IE/MAC) alignment of page ***/}.clear{ clear:both;/*** these next attributes are designed to keep the divheight to 0 pixels high, critical for Safari and Netscape 7 ***/ height:1px; overflow:hidden; line-height:1%; font-size:0px; margin-bottom:-1px;}* html .clear{height:auto;margin-bottom:0} /*** stops IE browsers from displayingthe clear div/br in the page, as these are for Moz/Opera andSafari only. If IE 5.x Win DID display these, the page is too high ***/#fullheightcontainer{ margin-left:auto; /*** Mozilla/Opera/Mac IE 5.x alignment of page ***/ margin-right:auto; /*** Mozilla/Opera/Mac IE 5.x alignment of page ***/ text-align:left; /*** IE Win re-alignment of page if page is centered ***/ position:relative; /*** Needed for IE, othewise header and footer aren't containeddirectly above and below the body ***/ width:782px; /*** Needed for Moz/Opera to keep page from sliding to left side ofpage when it calculates auto margins above. Can't use min-width. Note that puttingwidth in #fullheightcontainer shows it to IE and causes problems, so IE needs a hackto remove this width. Left Col + Right Col + Center Col + Both Inner Border + Both Outer Borders ***//* \*/ height:100%;/* Last height declaration hidden from Mac IE 5.x *//*** Needed for Moz to give full height design if page content istoo small to fill the page ***/}#wrapper{ min-height:100%; /*** moz uses this to make full height design. As this #wrapperis inside the #fullheightcontainer which is 100% height, moz will not inherit heightsfurther into the design inside this container, which you should be able to do withuse of the min-height style. Instead, Mozilla ignores the height:100% ormin-height:100% from this point inwards to the center of the design - a nasty bug.If you change this to height:100% moz won't expand the design if content grows.Aaaghhh. I pulled my hair out over this for days. ***//* \*/ height:100%;/* Last height declaration hidden from Mac IE 5.x *//*** Fixes height for non moz browsers, to full height ***/ border-right:1px solid #000000; /*** Sets the external right side border. ***/ border-left:1px solid #000000; /*** Sets the external left side border. ***/ background:#003399; /*** Set background color for side columns for Safari & IE ***/}#wrapp\65 r{ /*** for Opera and Moz (and some others will see it, but NOT Safari) ***/ height:auto; /*** For moz to stop it fixing height to 100% ***/}/* \*/* html #wrapper{ height:100%;}/* Last style with height declaration hidden from Mac IE 5.x *//*** Fixes height for IE, back to full height,from esc tab hack moz min-height solution ***/#outer{ z-index:1; /*** Critical value for Moz/Opera Background Column colors fudge to work ***/ position:relative; /*** IE needs this or the contents won't show outside the parent container. ***/ margin-left:150px; /*** Critical left col dimension value = left col width ***/ width:478px; /*** Critical left and right col/divider dimension value (moves inversly) = center col width ***/ border-right:1px solid #000000; /*** Sets the internal right side border. ***/ border-left:1px solid #000000; /*** Sets the internal left side border. ***/ background:#00CC66; /*** Sets background of center col***//* \*/ height:100%;/* Last height declaration hidden from Mac IE 5.x *//*** Needed for full height inner borders in Win IE ***/}/*** The next style hack for widths are NOT needed if no internal side borders are needed ***/* html #outer{ /*** IE5.x/win box model fix ***/ width:480px; /*** Critical left and right col/divider dimension value(moves inversly) = Center Col Width + Both Inner Borders ***/ w\idth:478px; /*** Critical left and right col/divider dimension value (moves inversly) = Center Col Width ***/}#float-wrap{ width:478px; /*** Critical left and right col/divider dimension value (moves inversly) = Center Col Width ***/ margin-right:-1px; /*** Static fix, doesn't change ***/ float:left; display:inline;}#left{ width:152px; /*** Critical left col/divider dimension value = Left Col Width + 1px + One Internal Border Width ***/ float:left; display:inline; position:relative; /*** IE needs this or the contents won't showoutside the parent container. ***/ margin-left:-151px; /*** Critical left col/divider dimension value = left col width + one internal border width ***/}*>html #left{width:151px;} /*** Fix only for IE/Mac = left col width + one internal border width ***/#container-left{ width:150px; /*** Critical left col dimension value = left col width - 1px ***/}#right{ float:left; display:inline; width:152px; /*** Critical right col/divider dimension value = right col width + 2px ***/ margin-right:-150px; /*** Critical right col/divider dimension value = negative right col width ***/ margin-left:-1px; /*** Static fix ***/ position:relative; /*** IE needs this or the contents won't showoutside the parent container. ****/}/* \*/* html #right{ width:152px; margin-left:0px; margin-right:-500px; mar\gin-right:-152px;}/* Above style hidden from Mac IE *//*** These commented-out rules below are there to explain the "Critical" info for the rules above, because comments must not appear within the Mac-hack. The "rules" below are not active, they are just for teaching purposes.* html #right{ width:152px; Critical right col/divider dimension value = right col width + one internal border width + 1px *** margin-left:0px; *** Critical right divider dimension value = a static 0px *** margin-right:-500px; *** IE5.x/win fix, must be above a critical number, but very high values appear okay *** mar\gin-right:-152px;*** Critical right col/divider dimension value = negative (right col width + one internal border width + 1px) ***}***/#container-right{/* \*/ width:150px;/* Above hidden from IE-Mac *//*** Critical right col dimension value = right col width ***/ margin-left:3px; /*** Critical right divider dimension value = one internal border width + 2px ***/}/* \*/* html #container-right{ fl\oat:right; di\splay:inline; margin-left:2px; mar\gin-left:0px;}/* Above style hidden from Mac IE *//*** Above margin left set to = one internal border width + 1px ***//*** Static fixes ***//*** a Note on the Holly hack: if IE/Win shows bugs it's a good idea to apply the height:1% hack to different elements and see if that fixes the problem. Sometimes it may be necessary to use "position: relative;" on certain elements, but it's hard to tell in advance which elements will need such fixes. ***//*** This is a STATIC fix for IE5/Win at the largest text size setting. ***//* \*/* html #left{margin-right:-3px;}/* Above style hidden from Mac IE *//*** All the IE fixes that are inside seperate "Mac-hacks" may be grouped within just one Mac-hack for convenience if desired. However, each fix must come later than the rule it is fixing or the fix itself will be overridden. ***/#center{ width:478px; /*** Set to = center col width ***/ float:right; display:inline;/* \*/ margin-left:-1px;/* Hidden from IE-mac */}/*** clearheader heights are made from header height + borders +any sidebar box height, less any sidebar intrusion.Similar calcs for footers. ***/#clearheadercenter{ height:72px; /*** needed to make room for header in center column ***/ overflow:hidden;}#clearheaderleft{ height:72px; /*** needed to make room for header in left column ***/ overflow:hidden;}#clearheaderright{ height:72px; /*** needed to make room for header in right column ***/ overflow:hidden;}#clearfootercenter{ height:52px; /*** needed to make room for footer in center column ***/ overflow:hidden;}#clearfooterleft{ height:52px; /*** needed to make room for footer in left column ***/ overflow:hidden;}#clearfooterright{ height:52px; /*** needed to make room for footer in right column ***/ overflow:hidden;}#footer{ z-index:1; /*** Critical value for Moz/Opera Background Column colors fudge to work ***/ position:absolute; clear: both; width:782px; /*** Set to Left Col + Right Col + Center Col + Both Inner Borders +Both External Borders ***/ height:52px; /*** = Bottom Margin + One Outer Border + body to footer divider depth +subfooter1 height + any other subfooter heights ***/ overflow:hidden; margin-top:-52px; /*** negative height ***/}#subfooter1{ color: #FFFFFF; background:#000000; /*** Background Color of Sub-footer #1 ***/ text-align:center; margin:0 1px; /*** Margin to show left and right External Borders - all sub-headers and sub-footers ***/ height:50px; /*** sub-footer row height ***/}#header{ z-index:1; /*** Critical value for Moz/Opera Background Column colors fudge to work ***/ position:absolute; top:0px; width:782px; /*** Set to Left Col (not if left sidebar fully intrudes into header or left sidebar is off)+ Right Col (not if right sidebar fully intrudes into header or right sidebar is off) + Center Col + Both InnerBorders (not if any sidebar intrudes into header or footer, or Inner Borders are off) + Both External Borders(not if external borders are off) ***/ height:72px; /*** = Top Margin + One Outer Border + header to body divider depth +subheader1 height + any other subheader heights ***/ overflow:hidden;}.outer_horiz_border, .sb_outer_horiz_border{ background:#000000; height:1px; overflow:hidden; font-size:0px}#subheader1{ background: #990000; /*** Background Color of Sub-header #1 ***/ text-align:center; margin:0 1px; /*** Margin to show left and right External Borders - all sub-headers and sub-footers ***/ height:70px; /*** sub-header row height ***/}#gfx_bg_middle{ top:0px; position:absolute; height:100%; overflow:hidden; width:478px; /*** = Center Col Width ***/ margin-left:150px; /*** = Left Col Width ***/ background:#00CC66; /*** Set background color for center column for Mozilla & Opera ***/ border-right:1px solid #000000; /*** Sets the internal left side border.Remove border styles if no Internal Borders. ***/ border-left:1px solid #000000; border-left:1px solid #000000;}* html #gfx_bg_middle{ display:none; /*** Hides the moz fix from IE ***/} noodle_real.css /*** The contents of this file were (ostensibly) written by Owen Briggs@ www.thenoodleincident.com, and any Copyright rests with him. Nocredit for the work that has gone into researching the use of fontsizes and styles rests with ClevaTreva Designs. 100% Kudos to Owen.This is an EDITED version of the original! You will want to play withthese settings to make your own style for fonts and color otherbits. ***/body { font-family: verdana, arial, helvetica, sans-serif; font-size:100.1%; /*** Don't change this setting. Make all otherfont-sizes in % (preferred) or ems ***/ color:#000000; }a { text-decoration: none; font-weight: bold; outline: none; }a:visited { }a:active { }a:hover { text-decoration: underline; }strong, b { font-weight: bold; }hr { margin: 0px; /* fixes xhtml N6 bug where the hr sits to the left*/ color: #ccc; /* for ie */ background-color: #ccc; /* for everyone else */ height: 1px; }p { font-size: 90%; line-height: 1.1em; margin-top: 1.5em; margin-bottom: 1.5em; }li { font-size: 90%; line-height: 1.1em; margin-top: 0.3em; margin-bottom: 0.2em; }ul { margin-top: 1.0em; margin-bottom: 1.0em; }td { font-size: 90%; }hr { margin-top: 2.0em; margin-bottom: 2.0em; }img { border: 0; }/*** the following styles and notes are © CopyrightBig John @ www.positioniseverything.net ***/div,p{margin:0}.italics-test, .italics-test-side {font-style: italic; text-align: justify; }/***The following fixes prevent justified italic textfrom destroying the layout in IE/win. The problemis that those properties together make IE force thecontainer wider, which in this type of floated layoutcauses a float drop.Pre-IE6 gets "width: 100%" and "overflow: hidden",while IE6 gets "width: auto" and "overflow: visible,which is the default, but explicitly stating it seemsto keep IE6 happy. IE6 also needs to see the"height: 1%" to give it some kind of box dimension.Browser coddling we call it. Finally, Bruno Fassinofound that "word-wrap: break-word;" disarranged thejustified text in IE5.5 and 6, so it is defaulted to"normal" for this text.If you don't need justified and italicized text thenforget all these fixes.Although, ClevaTreva adds, I have seen some oddbehavior with normal justified text in IE, sothis may be worth remembering.***//* \*/* html .italics-test, * html .italics-test-side {overflow: hidden;width: 100%;o\verflow: visible;w\idth: auto;he\ight: 1px;word-wrap: normal;}/* */ Not that it matters, but just to avoid the question of it, here's the IEstyle.css /*** The rule below prevents long urls from widening floated cols and breaking the layout in IE. It is not W3C valid, but if placed within a "Conditional comment" it will be hidden from all user agents other than IE/Win, and thus validate. This fix fails in IE5/Win. http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp ***/#outer{word-wrap:break-word;} The XML files all contain only a single paragraph and some content in it simply because I'm still outlining the stuff. Something like: <?xml version="1.0" encoding="windows-1251"?><?xml-stylesheet type="text/xsl" href="layout.xsl"?> <p> This is the<br /> Main Content<br /> </p> Any idea on what might treat theese odd behaviours from FF and Opera? Could they be some sort of browser bugs or there's something wrong with my approach?[edit] On parsing on the server side, it seems the parser doesn't like my style element in the conditional IE comment. Removing it however doesn't make any difference in how browsers behave on the client side (but it does display the server side generated page fine everywhere).[/edit]
  19. boen_robot

    XML to FO

    There is already a simple example on W3Schools.
  20. Agree.What you have understood wrong is probably the difference between XSLT and XSL-FO. XSL-FO contains many formatting stuff which could possibly replace CSS styling, but it's certanly not going to because of it's usability issues. XSL-FO makes it hard to acomplish things which are easy with CSS and yet it doesn't provide anything that CSS hasn't got. Because of that reason XSL-FO's place in the world wide web remains the one place where CSS is still a bit weak: Technical reports, papers and other off-screen media.XSLT on the other hand is practically the other part of XMLs mission- To separate content from presentation. It's also THE language for transforming one XML based language to any other XML based language (not necessary XHTML!!).The most typical situation which can illustrate XSLTs usefullness would be a plain XML file containg a content of a single page of yours. By using XSLT, you can turn that content into XHTML and add all common data (shared across pages) by processing another XML document and adding it's data into the page. The result is A LOT easier maintainance for you.However, using only one XHTML doesn't mean you have to spoil it by adding visual data. Infact it's bad. CSS could be used to serve different devices all of which read XHTML. XSLT allows you to share one content with different formats (beyond XHTML... like WML or SVG for starters) while CSS allows you to add different visualizations to the XHTML only.
  21. As far as I can see in this namespace, XPath 2.0 functions are still candidate reccomendation. That's probably why it's not working as it should be.By the way, the namespace you provded doesn't work for me and neither does W3Schools one. I would advice that you avoid using such not very well implemented functions.A much easier way to chech if something exists is to simply type it's name without any additional info: <xsl:if test="nodename"> That is of couse if you're using it with conditionals. Any other use would really requre that function.
  22. I don't get it. You mean you want to switch from one charset to another? If that's the case, you would have to create a server side script that would be aware of the differences in the charsets used (you would manually have to point those differences) and will edit the document to comply with them. There's no other way.If we're talking static documents' incompatability: Use a single charset in all of your XMLs and XSLTs.
  23. You seem to put your applications to a very weird level, that I seem to be unable to catch on with. I wonder why don't you try more traditional methods and then go wild with them. Anyway...If I understand correctly, you have two XMLs, each holding different valus of the same element, right? Depending on a certain criteria, you want to load one of them, correct? Soooo.... how about using when/otherwise instead?Something like this: <xsl:choose><xsl:when test="exists(document('newdata.xml')//information/items[id=$id])"><xsl:value-of select="document('newdata.xml')//information/items[id=$id]/data" ></xsl:when><xsl:otherwise><xsl:value-of select="itemdata" /></xsl:otherwise> ?
  24. They definetly won't do that. It would have a too huge hit on their reputation among consumers. Imagine a newbie user who has has some small experience with Internet Explorer in Windows XP and that's it. It takes it as given. Then it sees VistaBrowser and starts to ask himself "where did the internet go?". Then goes back on a computer on XP and refuses to update, thinking that VistaBrowser is something else.Besides, a name like VistaBrowser limit's it to that OS only. When the next comes out, they would have to change it to *OS*Browser, thus creating serious confusions with users. Having a unified name is better and as we see, they have chosen Internet Explorer, though they probably never intended for it to be THAT "neutral".
  25. I just made some small research to see what's that all about and it seems that UML is not a W3C specification, but OMG's one. So it's chances of getting in here are just as high as any non-W3C XML based technology- (almost) none. I must say I don't see any use of it too, unlike languages such as X3D for example.
×
×
  • Create New...