Jump to content

paetje

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by paetje

  1. I worked it out and it works fine alsoXSL <xsl:template match="object"> <xsl:value-of select="."/> <xsl:variable name="src" select="@src"/> <xsl:variable name="width" select="@width"/> <xsl:variable name="height" select="@height"/> <xsl:variable name="class" select="@class"/> <embed src="../Flash/{$src}" width="{$width}" height="{$height}" class="{$class}"/> </xsl:template> XML <object src="team.swf" width="550" height="350" class="team"></object>
  2. Does this also works for objects like Flash movies?
  3. Thanx Goat, works just fine!
  4. and I found it again: XSL<xsl:variable name="image-dir">/images</xsl:variable><xsl:template match="photograph"><img src="{$image-dir}/{href}" width="{size/@width}"/></xsl:template>XML<photograph> <href>headquarters.jpg</href> <size width="300"/></photograph>This would be like this in XHTML<img src="/images/headquarters.jpg" width="300"/>
  5. I have this <xsl:template match="picture"> <xsl:value-of select="." /> <!-- gives me "bla" --> <img src="." /> <!-- here must my patch be attatched --> </xsl:template> Don't know if its possible this way. The path of my picture must be universal. So when I have more pictures this statement still works.
  6. I made an element <picture src="path.jpg" alt="text">bla</picture> Now I want to show this picture on my page. I can find the picture and show my text "bla". But how must I load the picture?
  7. paetje

    Value elements

    Problem solved...I made some ATTRIBUTES for my elements. These attributes don't work but when I point XMetal to it, they work perfectley. You can say to XMetal witch element is supposed to be an picture element. But this element must have at least oen attribute. After pointing the element XMetal does the rest. It makes an standard picture insert button witch fills the element and attribute for you.
  8. paetje

    Value elements

    I'm building a couple of website with an XML system. Therefor I made a construction witch gives the builders of an XML file a helping hand. They don't need to "build" the XML files but edeting. Herefor I'm using XMetal and an DTD. I make a new blank file in XMetal and my DTD does the rest. My DTD gives the option to select elements that are known bij the DTD and insert them. On this way you can simple select and type instead of building.But now I'm having an element <picture>, this element doesn't contain a picture itself. But it supposed to contain the path of the picture. My fist thougt was an childelement with <img src=""> but this doesn't work. Does anyone know how I can add a path to the elements with use of an DTD?
  9. paetje

    DTD auto elements

    I made a couple little changes, all my elements are working the way I want. Only one thing doesn't work. My parent element <website> has to appear automaticley after opening a new file.
  10. paetje

    DTD auto elements

    I mad a DTD witch is currentley in use , but I want to optimise this DTD so no mistakes can be made. This is 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 (img+, alt+)> <!ELEMENT img (#PCDATA)> <!ELEMENT alt (#PCDATA)> <!ELEMENT lijst (item+, itemlink*)> <!ELEMENT item (#PCDATA)> <!ELEMENT itemlink (#PCDATA)> <!ELEMENT subalinea (nadruk*)> <!ELEMENT overig (links*, objecten*)> <!ELEMENT links (kop, link+)> <!ELEMENT kop (#PCDATA)> <!ELEMENT link (#PCDATA)> <!ELEMENT object (objectnaam)> <!ELEMENT objectnaam (#PCDATA)> This DTD is used on the program XMetal. When I make a blanc document I get all elements to choose from. But I want a standard document witch contains a couple of set elements. This elements supposed to be: website, titel, pagina, paginatitel, content, overig. On this way I get these elements witch are needed to create a valide page. So the people who will work with this DTD only have to fill in these elements.Does anyone know how I can make this happen?
  11. First my appologies for a question about DTD in an Schema forum. But I must use an DTD for support of my XML program (XMetal) and I can't figure out where to put my question.I'm trying to set up an DTD witch describes what element may be used on what location. Now I made an element <paragraph> and <subparagraph> the must contain both the child-element <bold>. Now I'm having an error message: "tag name is already been declared". How must I build my DTD valide and use one child-element in more parent-elements?
  12. What I see at a fist look is just fine, but I wonder if the dubble closing of the <xsl:template> does somthing wrong. I think you have to put only </xsl:template><xsl:template match="newline"> <BR/> <xsl:apply-templates/></xsl:stylesheet> afther the HTML part
  13. http://w3schools.invisionzone.com/index.php?showtopic=2855Take a look a my code. In the second XSL file the transform file search for "volgenderegel". Good luck
  14. paetje

    Frameset

    This works just fine thanx. Guess I'm doing something wrong couse now I have an empty page, my XSL can't find my XML doc. How can I call my XML file on a valide way?
  15. paetje

    Frameset

    In my HTML desgin I used a Frameset. Now I made the site with XML and XSL, but I can't figure ou thow to use a Frameset within XSL. The alternitive I use is an HTML file witch contains a Frameset. In this frameset I'm calling the XML files. Does anyone know if I can use framesets within XSL or is this HTML alternitive a correct way.
  16. I currently made a site with XML and XSL. I put the design in CSS and all explenations of the XML elements in an central XSL document. This document is loaded in all other XSL document so they know what to do by these elements.Now I want to update the content with the program XMetal. I can load the XML pages in XMetal and this works just fine, but.... When I want to use an element that is not in het current document XMetal doesn't support it. Now I want to load these elements standard into XMetal so it will be supported.
  17. paetje

    <b> markup

    my XML <?xml version="1.0"?><!-- naam van de website--><?xml-stylesheet type="text/xsl" href="welkom.xsl"?><!-- aanroepen XSL --><website naam="De lelie"> <!-- titel website--> <titel>De lelie </titel> <!-- naam van de pagina--> <welkom> <onderwerp>Welkom</onderwerp> <content><id>koptekst</id> <alinea>De Lelie is een <nadruk>groothandel </nadruk>in planten en bloemen. <afbeelding />Deze site geeft u informatie over ons bedrijf en onze artikelen. <subalinea>Daarnaast vindt u hier ook alles over De Grote Actie!</subalinea></alinea> <alinea>Nieuws alinea, hier vind <nadruk> €</nadruk> al het nieuws</alinea> </content> </welkom></website> fisrt XSL, tells the xml how it's supposed so be send to the browser <?xml version="1.0" encoding="ISO-8859-1" ?><!-- Edited with XML Spy v4.2 --><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method='html' version='1.0' encoding="ISO-8859-1" indent='yes'/><xsl:include href="inc_tags.xsl" /><xsl:template match="/"> <html> <link rel="stylesheet" type="text/css" href="lelie.css" /> <title>de Lelie</title> <body> <table class="bordertabel"> <td> <xsl:for-each select="website/welkom "> <xsl:apply-templates /> </xsl:for-each> </td> </table> </body> </html></xsl:template> second XSL tells the first XSL what to do by the following tags <?xml version="1.0" encoding="ISO-8859-1" ?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"><!-- uitleg voor de browser, wat moet de browser waar laten zien als hij statements tegenkomt --> <xsl:template match="welkom"> <table class="welkom"> <xsl:apply-templates select="content"/> </table> </xsl:template> <xsl:template match="onderwerp"> <tr> <th height="34" valign="top"><xsl:apply-templates/></th> </tr> </xsl:template><xsl:template match="content"> <tr> <td valign="top"><xsl:apply-templates select="alinea"/></td> </tr> </xsl:template><xsl:template match="alinea"> <P> <xsl:apply-templates/> </P> </xsl:template><xsl:template match="subalinea"> <BR/> <BR/> <xsl:apply-templates/> </xsl:template><xsl:template match="volgenderegel"> <BR/> <xsl:apply-templates/> </xsl:template><!-- afbeelding invoegen --><xsl:template match="afbeelding"> <img src="pics/001.jpg" /></xsl:template><!-- zoek de tag <nadruk> in het XML document en voer daar de volgende code voor uit --><xsl:template match="nadruk"> <span class="bold"> <xsl:apply-templates/> </span> </xsl:template> </xsl:stylesheet> the comment is in Dutch and so are the tagnames, but you can give it youre own name. Good luck with it
  18. paetje

    <b> markup

    this only works if your site is build in a loop: <xsl:for-each select="website/welkom "> <xsl:apply-templates /></xsl:for-each> when XSL apply's the templates he finds this code: <xsl:template match="nadruk"> <span class="bold"> <xsl:apply-templates/> </span> </xsl:template> and add CSS to it: .bold { font-weight:bold; } gives the result:this tag is bold but this part of the text to
  19. paetje

    <b> markup

    every tag <bold> gets class bold, CSS style says that the font-weight: bold. So no matter where you put this tag the text will be bold. This count for just one word but can also count for an blok of text.
  20. paetje

    <b> markup

    that's correctbut I solved the problem. I made a tag <bold></bold><xsl:template match="bold"> <span class="bold"> <xsl:apply-templates/> </span> </xsl:template>CSS.bold{ font-weight: bold;}
  21. I'm using the following code to make some words in my text boldcode in XML <nadruk> Bold </nadruk> code in XSL <xsl:template match="nadruk"> <span class="bold"> <xsl:apply-templates/> </span> </xsl:template> and with CSS .bold { font-weight:bold; } this works just fine but now I want one central document to valide all the pages, on the way you do with an CSS file. Does anyone know how to make this kind of document and call it on my XSL page?
  22. Does anyone know how I can transform the tag <euro> into € with XSL? I tried to use € but that gives me an error.
  23. paetje

    <b> markup

    I made a site with content in XML with data islands. They gave a the advise to use XSL for displaying the content. But how can I use tags like <b> and <i>?*I am no that formilliar with the use and declaration of XSL.
  24. I'm working on a central XML document. This document needs to contain all content of a site. Text is no problem but I can't find the right way to put images in the XML file and show it with XSL.Putting images in the XSL file is no problem.But I want 1 document with all content (text - images) sow how can I put the images volide in XML?
×
×
  • Create New...