Namespaces

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Uliana
    New Member
    • Mar 2007
    • 8

    #1

    Namespaces

    When I write:

    <xsl:styleshe et version="1.0"
    xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
    xmlns:style="ht tp://www.dvdforum.or g/2005/ihd#style"
    xmlns:state="ht tp://www.dvdforum.or g/2005/ihd#state"
    xmlns:fo="http://www.dvdforum.or g/2005/fo">

    <xsl:output method="xml" version="1.0" indent="yes" />

    <xsl:attribut e-set name="SetPositi on">
    <xsl:attribut e name="position" ><xsl:value-of select="@style: position"/></xsl:attribute>
    <xsl:attribut e name="left"><xs l:value-of select="@style: x"/></xsl:attribute>
    <xsl:attribut e name="top"><xsl :value-of select="@style: y"/></xsl:attribute>
    <xsl:attribut e name="width"><x sl:value-of select="@style: width"/></xsl:attribute>
    <xsl:attribut e name="height">< xsl:value-of select="@style: height"/></xsl:attribute>
    <xsl:attribut e name="stul"><xs l:value-of select="@stul"/></xsl:attribute>
    </xsl:attribute-set>

    <xsl:template match="/">
    <xsl:for-each select="/body/div">
    <xsl:element name="fo:block" use-attribute-sets="SetPositi on"/>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>


    I get:

    <block xmlns="http://www.dvdforum.or g/2005/fo" position="" left="" top="" width="" height="" stul="red"/>

    So only attribute that doesnt use name space got his value...
  • dorinbogdan
    Recognized Expert Contributor
    • Feb 2007
    • 839

    #2
    Try this way:
    [HTML]<xsl:attribut e name="width" namespace="styl e"><xsl:valu e-of select="@width"/></xsl:attribute>[/HTML]

    Comment

    • dorinbogdan
      Recognized Expert Contributor
      • Feb 2007
      • 839

      #3
      Hi,
      Did you succeed to solve the problem ?
      If yes, please let me know, in order to close the thread.
      Thanks,
      Dorin.

      Comment

      Working...