Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Striggling with correct syntax 1

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
I am trying to use xpath to set the max length of a control on a browser form.
Code:
<input type="text" name="txtPostcode" id="txtPostcode">
  <xsl:for-each select="document('[URL unfurl="true"]http://localhost/xmlproject/bdefinitions.xsd')/xs:schema/xs:simpleType[/URL][@name='postcodetype']//xs:length">
  <maxlength value="{@value}"/>
  </xsl:for-each>	
</input>

a) i cant get the maxlength attribute set, and
b) I am sure that a for each when I know that there is one node is not the way to go!

any clues / pointers appreciated

K
 
Code:
<input type="text" name="txtPostcode" id="txtPostcode" maxlength="{document('[URL unfurl="true"]http://localhost/xmlproject/bdefinitions.xsd')/xs:schema/xs:simpleType[/URL][@name='postcodetype']//xs:length}"/>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top