[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: attribute question
> > if i do this: > > <input type="hidden" name="Address"> > <xsl:attribute name="VALUE"> > <xsl:value-of select="/housenumber"/><xsl:value-of > select="/streetname"/><xsl:value-of select="/streetsuffix"/> > </xsl:attribute> > </input> > > the output is this: 111MainSt. Presumably the "/" before housenumber, etc, is a typo? As written, you're selecting the housenumber etc only if it is the document element: and they can't *all* be the document element! > > if i do this: > > <input type="hidden" name="Address"> > <xsl:attribute name="VALUE"> > <xsl:value-of select="/housenumber"/> > <xsl:value-of select="/streetname"/> > <xsl:value-of select="/streetsuffix"/> > </xsl:attribute> > </input> > > the output is this: > > 111 > Main > St. > It shouldn't be, unless your stylesheet is using xml:space="preserve" somewhere. The whitespace text nodes between the <xsl:value-of> elements should have been stripped. What product are you using? > if i put spaces between the xsl:value-of tags, the output is > on three lines as well. Stranger and stranger. What product are you using? > does anyone know how i can get the data to look like this: > > 111 Main St. > 1. use an XSL processor that conforms to the standard 2. write <xsl:value-of select="concat(housenumber, ' ', streetname, ' ', suffix)"/>; or if you don't mind verbosity, insert the spaces using <xsl:text>. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|