Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Dec 2002
    Location
    France
    Posts
    522
    Thanks
    0
    Thanked 0 Times in 0 Posts

    metas and value of select

    <xsl:template match="description">
    <meta name="description" content="{<xsl:value-of select="."/>}"/>
    </xsl:template>

    does not work , how can I do it ?

    thank you

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You don't need the value-of if you're using {} - I think you can just go

    <meta name="description" content="{.}"/>

    If that doesn't fix it - consider the context of description - does it exist in the context of your template call?

  • #3
    Regular Coder
    Join Date
    Dec 2002
    Location
    France
    Posts
    522
    Thanks
    0
    Thanked 0 Times in 0 Posts

    try

    I have tried


    <xsl:for-each select="metas">
    <title>
    <xsl:value-of select="title"/>
    </title>
    <meta name="description" content="{description}"/>
    <meta name="keywords" content="{keywords}"/>
    </xsl:for-each>

    but difficult to know if it works , the source of the page only shows xml

    and the xml file of course

    <metas>
    <title>protection de dossier par web.config</title>
    <keywords>
    web.config,
    protection,
    protection web.config,
    authentification,
    authentification web.config,
    authorization,
    autorisation,
    web.config authorization,
    web.config autorisation
    </keywords>
    <description>protection de dossier par web.config mode Form, plateforme ASP NET</description>
    </metas>

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm confused by what you're asking ...

    but difficult to know if it works , the source of the page only shows xml
    What do you have - an XML page, and XSL stylesheet? If you have them linked together, and your output method is correct, then you should see visual XHTML ....

    Maybe you could let us see your whole stylesheet

  • #5
    Regular Coder
    Join Date
    Dec 2002
    Location
    France
    Posts
    522
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ?

    I d'ont undestsand too
    now all works ! the page look like I want, it works for Mozilla, Netscape, IE, not for Opera (no transformation... maybe version 10 ! )

    it looks absolutly like a normal HTML page BUT !!!! :-(( if I look the source of tje page into the browser I only se ma xml file and not the transformation, is it right ??



    if you want to have a look here is the code

    http://aspalliance.com/aylar/ViewPas...asteCodeID=339

    thank you so much !

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah that's right - if you do client-side transformation using an xsl-stylesheet call in the XML doc, then the XML doc is what you'll see in the source code.

    But if you do it server-side, you'll see the output XHTML.

    Only IE6 and Mozilla properly support client-side XML; personally I've had no luck gettingc client-side transformation to work in mozilla - it just doesn't work for me. I've probably made some trivial mistake ... or possible my local Apache server is generating the wrong mime types.

    But either way - if you can do the transformation server-side that's better IMO, because then all browsers can see the output, not just IE and gecko.

  • #7
    Regular Coder
    Join Date
    Dec 2002
    Location
    France
    Posts
    522
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ok

    ok ! I was afraid !

    yes of course I can transform it with asp net easily , but I find so exciting to be free from any other langage, and I'm falling in love with XML

    I don't understand your problem with Mozilla or Netscape , because it works the same as IE (last version of course)

    and have you any idea of what will get the motors like google , ect... for tilte keywords.... when the page source look only like xml ?

    another personal question ? have you tried your brother cake menu working with xml file as dataSource ? I have an example of such a menu and it is very practicle

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ok

    yes of course I can transform it with asp net easily , but I find so exciting to be free from any other langage, and I'm falling in love with XML
    Fair enough, but the native-code required is like 4 lines or something ... I wouldn't worry about that ... You still have platform independence.


    I don't understand your problem with Mozilla or Netscape , because it works the same as IE (last version of course)
    Neither do I - it's probably something really obvious I'm missing. I'll probably start a thread about it one of these days, but to be perfectly honest, I don't really care; I have basically no interest in client-side transformation at the moment.


    and have you any idea of what will get the motors like google , ect... for tilte keywords.... when the page source look only like xml ?
    No idea; but my guess is that the spider will index your actual output, not the XML.

    another personal question ? have you tried your brother cake menu working with xml file as dataSource ? I have an example of such a menu and it is very practicle
    Funny you should say that .... I have, and it's gonna be available with v3.8 - XML data / DTD for validation and XSL to transform it into javascript ... check my site at the end of this weekend
    Last edited by brothercake; 01-30-2003 at 06:46 PM.

  • #9
    Regular Coder
    Join Date
    Dec 2002
    Location
    France
    Posts
    522
    Thanks
    0
    Thanked 0 Times in 0 Posts

    :-)

    Funny you should say that .... I have, and it's gonna be available with v3.8 - XML data / DTD for validation and XSL to transform it into javascript ... check my site at the end of this weekend

    super ! I'll not miss it , I am longing to see it, your menu was allready gread ! the only thing I was distrurbed with were compacted datas into javascript

    thank you again and see you soon :-)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •