xsl定义的全局变量如何没有值

xsl定义的全局变量怎么没有值
a.xsl
XML code

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:variable name="tabid" select="//input[@name='tabid']/@value"> </xsl:variable>
    <xsl:template match="/" >
         <html>
          <INPUT type="text" name="tabid" value="10000" /><!--value值不是固定的-->
          </html>
        

         </xsl:template>

</xsl:stylesheet>


b.xsl
XML code


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="b.xsl" />
    <xsl:template match="/" >
          <html>
                <INPUT type="text" name="" value="{$tabid}" /><!--如何能获取到10000这个值,这里是空-->
          </html>
        
          </xsl:template>
</xsl:stylesheet>




请问b.xsl中如何获取到a.xsl中的10000这个值,,,不管用什么方法! 拜谢!

------解决方案--------------------
这是因为你没有搞清楚“源文档”是什么?
你的 a.xsl 这个样式表中,原本意思应该是获取“同文档”中的 INPUT 元素的 value。但你的全局变量中的写法是针对“源文档”中的 input 元素操作的,也就是说,是与你的样式表关联的 XML 文档。
按照你的原意,你应该使用 document 函数,参数为空串,表示本文档自身。同时要注意大小写,INPUT 和 input 是不同的元素。

a.xsl
XML code

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:variable name="tabid" select="document('')//INPUT[@name='tabid']/@value"> </xsl:variable>
    <xsl:template match="/" >
         <html>
          <INPUT type="text" name="tabid" value="10000" /><!--value值不是固定的-->
          </html>
        

         </xsl:template>

</xsl:stylesheet>