Total members 11793 |It is currently Fri Aug 23, 2019 12:27 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





XSD Attributes :
XSD Attributes is used only with complex types .The declaration of attribute is like simple types. In declaration you define attribute name and type.

Example on attribute declaration:
<xs:attribute name="mydate" type="date"/>

Type can be :
- xs:boolean
- xs:date
- xs:time
- xs:string
- xs:decimal
- xs:integer


Example on attribute usage:

<xs:attribute name="mydate" type="xs:date"/>

Xml is:
Code:
<event mydate="1-1-2009">New customer</event>


Default value for attributes:
Code:
<xs:attribute name="mydate" type="xs:date default="0-0-0000" />


Default value is the value which attribute take when you don't specify any values.
Fixed value for attributes:
Code:
<xs:attribute name="mydate" type="xs:date" fixed="0-0-0000" />


Required attributes:
To ensure that the attribute will exist in the element you use required.
Code:
<xs:attribute name="mydate" type="xs:date" use="required" />





Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : lesson3 :XSD Attributes
 change link <a> attributes dynamically     -  
 get HTML elements attributes values using JQuery     -  



Topic Tags

XSD Attributes






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com