![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XPATH with [Thread Next] Re: XPATH with To: NULL Date: 7/1/2004 7:23:00 PM qluo wrote:
> <Data
> ss:Type="$data_type"
> NAME="$field_name" xmlns="urn:schemas-microsoft-com:office:spreadsheet"
> xmlns:o="urn:schemas-microsoft-com:office:office"
> xmlns:x="urn:schemas-microsoft-com:office:excel"
> xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
> xmlns:html="http://www.w3.org/TR/REC-html40">
> </Data>
>
> How can I get the variable value into xml output?
Use {} :
<Data ss:Type="{$data_type}" NAME="{$field_name}"><xsl:value-of
select="$field_data"/></Data>
> And how can I get rid of the annoying lines of "xmlns:"?
Remove xmlns="urn:schemas-microsoft-com:office:spreadsheet" from the
xsl:stylesheet and add the rest to excluse-result-prefixes attribute:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="o x ss html">
Any namespace listed in that attribute won't be outputted unless you
output any attribute or element in that namespace (the case for "ss").
--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
