Jump to content

paetje

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by paetje

  1. XSL is a stylesheet for XML element. This means you tell how or what to do with the elements. Like HTML does automaticly. CSS is used for the design of your text and positioning of items. You can also do this within XSL but that gives you an messy code. Just like in HTML, you can say font, size etc. But when you do this with CSS you have a clean HTML / XSL code. The advantage of this is the overvieuw in your code, this means youre code is easilly to edit.Don't think CSS going to dissapear soon. CSS is just a smaller part of the whole system. But still useble.The best way in my eyes is use XSL for the translation of the XML elements and do as mutch as possible design in CSS.
  2. Oops forgot to awnser the whole question. <xsl:template match="paragraph"> <p> <xsl:apply-templates/> </p> </xsl:template> This is my code, you can always update it on your own way. The missing part was: <xsl:apply-templates/>.Becouse you say apply paragraph. A part of this paragraph is a link. So it is shown. Later you say make a link. So you get an extra link. But when you say <xsl:apply-templates/>, you mean:first <p> the look further to other expressions and apply them first. When youre done with that apply </p>.
  3. There are a couple of ways to make links, here you have a few of them:XSL-T <xsl:template match="link1"> <span class="link"> <a href="url.xml" target="_self" >text</a> </span> </xsl:template> XML <link1 /> This link has a set href and text. Now it thows "text".XSL-T <xsl:template match="link1"> <span class="link"> <a href="../XML/contact.xml" target="_self" > <xsl:value-of select="."/> </a> </span> </xsl:template> XML <link1>One</link1> This Link has a set href but a variable text. If you change the text in XML its going te be displayed like this. Now it shows "One"XSL-T <xsl:template match="link" > <span class="link"> <xsl:variable name="src" select="@src" /> <xsl:variable name="target" select="@target" /> <a href="../XML/{$src}.xml" target="{$target}"> <xsl:value-of select="."/> </a> </span> </xsl:template> XML <link src="61" target="mainFrame">BLA</link> Everything as variable. Everything is loaded from your XML file. This shows "BLA".XLS-T <xsl:variable name="image-dir">/images</xsl:variable><xsl:template match="photograph"><img src="{$image-dir}/{href}" target=""/></xsl:template> XML <link> <href>headquarters.htm</href> <target>mainFrame</target></link> And you can expand this with text, like you did before.Hopefully you find some usefull ways between the code.
  4. I want the same characterset evereywhere. And I've done that. If I open in a browser, notepad, Dreamweaver is show the caracters well. But the edit program XMetal still makes different characters. But it does work with a DTD so I thougt there might be a opportunity. Untill then I'll look opon a solution within XMetal.Tnx for thinking with me.
  5. Hi I'm working on a project with XML based websites. All the content is stored in a XML file. This XML file is transformed with XSL-T. This works all fine. Now I made my websites on this way to easely edit my website with a program called XMetal. In here you can update the content of youre XML tags. This also works.But when I use special characters It's getting strange. I can and may use the caracters, I told my XSL to encode as ISO-8859-1. I can use the caracters and save them. But when I load a saved page I get strage caracters from another caracterset. This means I have to change all the lost characters everytime I want to edit my page. Does anyone has a solution?
  6. How Can I change a value in CSS with Javascript?I want a div to appear on the command of javascript.now I have: .image {visibility: hidden;}
  7. The main idea is to make an intro movie. This movie must be in an div over the HTML/CSS site. When the movie is finished playing I want the div of the movie to be unvisible (with CSS if possible).
  8. I'm trying some new things on my site. Now I want to make it possible to change the visibilety of some divs I made in HTML/CSS. Is it possible to do this with Flash?
  9. I have a "start" page. On this page I have a link, this link should go to my "index"page. Can I give (at the same time) an attribute (in the index page) another value?
  10. Normally you load an XML page and that page sends the data to the XSL file to transform it into XHTML. But can it be done an otherway like loading the XSL page witch say where to load the info from.I have a page with 4 options. Those options must show the same XML file with a different XSL file. Or is there an other better solusion?
  11. start --> 4 options (head subjects)index --> 20 options (4x head subjects)all pages must be load in an IframeThe problem is I don't know how many pages and subjects there presicely gonna be. Couse I'm making the setup for the website but the real content is going to be realised a bit later. At that time I'm not availible for this project. So now I make a website with many options to find you're way trough the website.Why I want to use this way to search trough the website becouse you get 4 options at the first time, that makes it easier to get the info you want. If you geth to many options its possible you don't know where to go. If you're already in the "real" site its mutch easier.
  12. Don't think thats an option, becouse there could be to many subjects. So the page is not handy to start. When you have a main subject you can start really quick and if you want to know more there is an option on my index page to search further.
  13. I'm working on a site with a couple of pages. To make the navigation easy to understand I created a "start" page with 4 subjects on it. These subjects must lead you to the next page my "index". On this index page I have an iframe.If I click on one of the subjects on my start page I want the right page to start in the iframe. So the iframe starts with another page everytime. The subject on the start page leads me to my index and must give the first loaded page in my iframe at the same time.Anyone any idea? (Without making 4 index pages)ps. I have no PHP support
  14. I tried this on a couple of places but didn't work , here it does work .So thanx
  15. I found a script to create a sitemap witch look logical and handy to me. Now I can make the path like I want but when the page is loaded the whole path starts open. It's closeble but I want it to start closed, anyone a suggestion?HTML: <html> <head> <title>Test</title></head> <link rel="stylesheet" type="text/css" href="test.css"> <script language="JavaScript" src="menu.js"></script> <body> <div id="menu"> <ul> <li><a href="1.htm" target="mainFrame">Startpagina</a></li> <li><a href="2.htm" target="mainFrame">Cursussen</a></li> <li><a href="3.htm" target="mainFrame">Links</a></li> <li><a href="" target="mainFrame" onClick="return expandOrCollapse(this);">Artikels</a> <ul class="submenu"> <li><a href="4.1.htm" target="mainFrame">PHP</a></li> <li><a href="4.2.htm" target="mainFrame">HTML</a></li> <li><a href="" target="mainFrame" onClick="return expandOrCollapse(this);">JAVASCRIPT</a></li> <ul> <li><a href="4.1.htm" target="mainFrame">TEST</a></li> </ul> </ul> </li> <li class="last"><a href="5.htm" target="mainFrame">Scripts</a></li> </ul> </div> </body> </html> java script: function expandOrCollapse(menu) { var ul = menu.nextSibling; while(ul.tagName != "UL") // Search for the next UL tag { ul = ul.nextSibling; if ( ul == null ) return true; } if ( ul.style.display == "none" || ul.style.display == "" ) ul.style.display = "block"; else ul.style.display = "none"; return false; } CSS: /* CSS Document */ body { background-color: palegreen; } #menu { width:12em; } #menu ul { list-style:none; margin-left:0pt; } #menu ul.submenu { margin-left:10px; } #menu li a { display:block; padding: 5px 5px 5px 0.5em; border-left: 10px solid darkgreen; border-right: 10px solid darkgreen; background-color: seagreen; color: #fff; text-decoration: none; width:100%; } #menu li a:hover { border-left: 10px solid yellowgreen; border-right: 10px solid yellowgreen; background-color: green; color: #fff; } #menu li { border-top: 1px solid palegreen; } #menu li.last { border-bottom: 1px solid palegreen; }
  16. Srie forgot I posted here. The problem is already solved, see other post by me.thanx anyway
  17. paetje

    DTD elements order

    I'm using an DTD becouse the program I work with doesn't support schema . Otherwise I would have used schema.
  18. This is my contact image .contact { position: absolute; top: 350px; left: 700px; z-index: 1; }
  19. It's quite strange, when I connect an class to the picture (and the alt-tekst) it puts my alt tekt on top . But when I don't have a class it shows my picture first , this is the way it supposed to be.But how can I make it the way that its always the right way ?
  20. Oops forget to remove . Thanx this works. But one thing I can't figure out why. I get my alt text before my picture. And so the text is showed above my picture.
  21. I want to fill in my alt text for the use of an caption beneath my pictureThe code in XSL-T for my picture: <xsl:template match="picture"> <xsl:value-of select="."/> <xsl:variable name="src" select="@src"/> <xsl:variable name="class" select="@class"/> <img src="{$src}" class="{$class}"/> </xsl:template> code for my XML: <picture src="../Pics/cont@ct.gif" alt="this is my contact picture" class="contact"></picture> So this must give me my picture with "this is my contact picture" under it.
  22. I want to make an alement <comment></comment> within my XML document. This should be transformed by my XSL-T document. <xsl:template match="comment"> <!-- <xsl:apply-templates/> --> </xsl:template> This doesn't work. This comment element is used to put comment into my XML document while I'm using XMetal.Does anyone know how I can make this work ?
  23. In stead of using id's use classes they can be used as many times as you like.
  24. paetje

    DTD elements order

    I made an DTD now I my problem that my elements must appear in the order that is set in the DTD. I sepparated the elements with the ",". What must I use to let my elements appear in a different order?Here's my DTD: <!ELEMENT website (titel, pagina) > <!ELEMENT titel (#PCDATA) > <!ELEMENT pagina (paginatitel, content, overig)> <!ELEMENT paginatitel (#PCDATA)> <!ELEMENT content (alinea*)> <!ELEMENT alinea (#PCDATA, nadruk*, tekstlink*, afbeelding*, lijst*, subalinea*)> <!ELEMENT nadruk (#PCDATA)> <!ELEMENT tekstlink (#PCDATA)> <!ELEMENT afbeelding (#PCDATA)> <!ATTLIST afbeelding src CDATA #REQUIRED> <!ATTLIST afbeelding alt CDATA #REQUIRED> <!ATTLIST afbeelding class CDATA #REQUIRED> <!ELEMENT lijst (item+, itemlink*)> <!ELEMENT item (#PCDATA)> <!ELEMENT itemlink (#PCDATA)> <!ELEMENT subalinea (#PCDATA, nadruk*, tekstlink*, afbeelding*, lijst*)> <!ELEMENT overig (links*, objecten*)> <!ELEMENT links (kop, link+)> <!ELEMENT kop (#PCDATA)> <!ELEMENT link (#PCDATA)> <!ELEMENT ojecten (objectnaam)> <!ELEMENT object (#PCDATA)> <!ATTLIST object naam CDATA #REQUIRED>
×
×
  • Create New...