DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Embed xml property into <body> xsl...???

Hybrid View

  1. #1
    jason Guest

    Embed xml property into <body> xsl...???


    Ahoy,

    Does anyone perhaps know how to embed an xml property value eg <color bg="orange"
    /> into the <body BACKGROUND=""> property.

    Thus, the xsl extracts "orange" from the xml doc and places it into the body
    tag. Nesting a <xsl:for-each value...> does not seem to work and throws
    up an error.

    Will u tell me that I have to redesign my xml doc and actually print out
    the <BODY tag> from an xml doc. Hmmm, any hints will go a long way >>>

    Thanks Jason - cape town, south africa

  2. #2
    Russell Jones Guest

    Re: Embed xml property into <body> xsl...???

    This will produce the output "<body background="orange"></body>"

    <body><xsl:attribute name="background">orange</xsl:attribute></body>

    Russell Jones
    Sr. Web Development Editor
    DevX.com
    "jason" <jason@silverscape.co.za> wrote in message
    news:3a76b8e4$1@news.devx.com...
    >
    > Ahoy,
    >
    > Does anyone perhaps know how to embed an xml property value eg <color

    bg="orange"
    > /> into the <body BACKGROUND=""> property.
    >
    > Thus, the xsl extracts "orange" from the xml doc and places it into the

    body
    > tag. Nesting a <xsl:for-each value...> does not seem to work and throws
    > up an error.
    >
    > Will u tell me that I have to redesign my xml doc and actually print out
    > the <BODY tag> from an xml doc. Hmmm, any hints will go a long way >>>
    >
    > Thanks Jason - cape town, south africa




  3. #3
    Rob Collins Guest

    Re: Embed xml property into <body> xsl...???


    This will pull the <BACKGROUND> tag value from the current xml node and assign
    it to the "background" attribute of the body tag:

    <xsl:attribute name="background"><xsl:value-of select="BACKGROUND"/></xsl:attribute>




    "Russell Jones" <arj1@northstate.net> wrote:
    >This will produce the output "<body background="orange"></body>"
    >
    ><body><xsl:attribute name="background">orange</xsl:attribute></body>
    >
    >Russell Jones
    >Sr. Web Development Editor
    >DevX.com
    >"jason" <jason@silverscape.co.za> wrote in message
    >news:3a76b8e4$1@news.devx.com...
    >>
    >> Ahoy,
    >>
    >> Does anyone perhaps know how to embed an xml property value eg <color

    >bg="orange"
    >> /> into the <body BACKGROUND=""> property.
    >>
    >> Thus, the xsl extracts "orange" from the xml doc and places it into the

    >body
    >> tag. Nesting a <xsl:for-each value...> does not seem to work and throws
    >> up an error.
    >>
    >> Will u tell me that I have to redesign my xml doc and actually print out
    >> the <BODY tag> from an xml doc. Hmmm, any hints will go a long way >>>
    >>
    >> Thanks Jason - cape town, south africa

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center