[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Find attribute of node derived from extended base
At 2004-06-24 00:27 +0200, xdevpj@xxxxxx wrote:
I want to know wheter or not an ancester of a node has an attribute maxOccurs and the value of this attribute. You don't say if you are using XSLT 1.0, but I'll assume you are. when the current node is i.e: XPath 1.0 delivers specified attributes from the start tags and defaulted attributes from an XML 1.0 DTD. XPath 1.0 knows nothing about W3C Schema. Any Ideas? I'm working with Universal Business Language (UBL) Schemas that are written in W3C Schema and they have defaulted attributes as well ... and I'm using XSLT/XPath 1.0 so I'm faced with the same problem you have. I run my XML instances through the Xerces DOMPrint sample application before applying the XSLT/XPath 1.0 stylesheet. This utility will output an XML document complete with W3C Schema defaulted attributes for the input XML document. There is a W3C schema for W3C schemas, so I suspect if you ran your schema through DOMPrint you would end up with a "fleshed-out" schema complete with defaulted attributes from the schema for schemas, and then you can run your XSLT/XPath 1.0 stylesheet against that output instance. I hope this helps. ........................... Ken -- Public training 3 days XSLT & 2 days XSL-FO: Phoenix,AZ 2004-08-23 World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|