This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: String size in a schema
- To: xsl-list at mulberrytech dot com
- Subject: Re: String size in a schema
- From: Eric van der Vlist <vdv at dyomedea dot com>
- Date: Thu, 30 Nov 2000 16:56:59 +0100
- References: <3A266D12.72ABC3EB@silicom.fr>
- Reply-To: xsl-list at mulberrytech dot com
An't you confusing the XSLT and W3C XML Schema "attribute" elements that
are 2 absolutely different stuff (and a good illustration of what the
namespaces are used for) ?
I guess that you want to define a W3C XML Schema attribute and I'll try
to answer even though it's off topic on a XSL list...
A construct for define an attribute that is a string with less than 30
characters is:
<xsd:attribute name="products">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute >
Hope this helps,
Eric
David Delgranche wrote:
>
> Hi
>
> I'm writing an XSLT stylesheet to create a SQL script from a schema. I
> have read the XMLschema part 0 specifications but I still have a
> question. I would like to be able to declare attribute or element typed
> as a string but with specifying the maximum length... I would like
> something like:
> <xsl:attribute name="products" type="xsd:string" maxlength="30"/>
> It seems that facets could help me. I had a look at the documentation on
> them but there is no implementation example.. Does anyone know how to
> use them?
> Thankes a lot for help
> David
> --
> David DELGRANCHE
> Silicom Region Ouest
> 80 av des Buttes de Coesmes 35700 RENNES
> Tel: 02 99 84 17 17
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
--
See you at XML 2000
http://gca.org/attend/2000_conferences/XML_2000/building.htm#vlist
------------------------------------------------------------------------
Eric van der Vlist Dyomedea http://dyomedea.com
http://xmlfr.org http://4xt.org http://ducotede.com
------------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list