Subject: [xsl] XSLT 2 processing of W3C Schema expressed default attributes From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 02 Sep 2003 11:24:05 -0400 |
V:\samp>type defattr.xml <?xml version="1.0" encoding="iso-8859-1"?> <doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="defattr.wxd"> <entry1>AB</entry1> <entry2 attr="CD"/> </doc>
V:\samp>type defattr.wxd <?xml version="1.0" encoding="iso-8859-1"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="doc"> <xsd:complexType> <xsd:sequence> <xsd:element name="entry1"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="codelist"> <xsd:attribute name="defattr" type="xsd:string" use="optional" default="hello"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> <xsd:element name="entry2"> <xsd:complexType> <xsd:attribute name="attr" type="codelist"/> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element>
<xsd:simpleType name="codelist"> <xsd:restriction base="xsd:normalizedString"> <xsd:enumeration value="AB"/> <xsd:enumeration value="CD"/> </xsd:restriction> </xsd:simpleType>
V:\samp>msv defattr.wxd defattr.xml No validation errors.
V:\samp>type copyofall2.xsl <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/"> <xsl:copy-of select="."/> </xsl:template>
-- Next public European delivery: 3-day XSLT/2-day XSL-FO 2003-09-22 Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide: please contact us for the details
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) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Antenna House released Be, Elliotte Rusty Harol | Thread | RE: [xsl] XSLT 2 processing of W3C , Michael Kay |
Re: [xsl] XPath: excluding a descen, David Carlisle | Date | [xsl] Using a variable in XSLT, Tim Müller-Seydlitz |
Month |