is square bracket valid in xsl tag
I want design something like...
<DB[0]><xsl:value-of select="test"><DB[0]>
which will update th开发者_开发技巧e database table field DB[0] with data test.
But it's not working ...as xsl is not allowing [] bracket.
- In case you need to create a well-formed XML document, then a string like " - <DB[0]>" isn't a legal name.
- In case you want to create just text, you can alwyas do so by specifying: 
<xsl:output method="text"/>
So, this transformation:
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output method="text"/>
 <xsl:template match="/">
   <DB[0]><xsl:value-of select="test"/></DB[0]>
 </xsl:template>
</xsl:stylesheet>
when applied on this XML document:
<test>XXX</test>
produces:
<DB[0]>XXX</DB[0]>
XML element Naming Conventions
- Names can contain any alphanumeric character, but must not start with a number or punctuation character.
- Names cannot contain spaces.
- Names must not start with the letters xml, as they could be easily confused with an XML document definition.
- Do not use ":" characters within element names.
For exact definition, please visit here.
So either '[' or ']' is not allowed.
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论