[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Schema and fixed attribute value

Subject: Schema and fixed attribute value
From: "Bruno Chatel" <bcha@xxxxxxxxxxx>
Date: Wed, 17 Jul 2002 17:47:12 +0200
bruno chatel

 Hello,

 I am looking for a way to get the value of an attributes declared as fixed
 in my w3c schema, from a stylesheet...

(i am using Xalan J 2.3.1)


Something like this :

 *) unit.xsd

 <xs:complexType name="m">
       <xs:simpleContent>
          <xs:extension base="xs:string">
              <xs:attribute name="unité" type="xs:string" fixed="m"/>
          </xs:extension>
      </xs:simpleContent>
  </xs:complexType>

  <xs:element name="DIAM_ANALYSE" type="m"/>

  *) unit.xml

  <DIAM_ANALYSE>3.14159</DIAM_ANALYSE>

  *) unit.xsl

  <xsl:value-of select="DIAM_ANALYSE/@unité"/>

 I tried to load the unit.xml as a DOMSource by using Xerces2.0.2  parser
 with features like
 parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
 parser.setFeature("http://apache.org/xml/features/validation/schema",true);
 parser.setFeature("http://xml.org/sax/features/namespaces", true);

parser.setFeature("http://apache.org/xml/features/validation/schema/normalized-value",true
  );

parser.setFeature("http://apache.org/xml/features/validation/schema/element-default",true)
 ;

 but the attribute value seems to be not accessible in my stylesheet.

 Any idea ?

 Thanks in advance

 Regards

 -- bruno --
 Bruno Chatel
 Tel : (+33)[0] 4 96 11 14 57
 Email : bcha@xxxxxxxxxxx
 http://www.chadocs.com
 ----------------------------------------





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.