|
[
Permlink
| « Hide
]
Luke Taylor added a comment - 20/Aug/08 08:58 AM
We may have to consider changing various attributes to xsd:string to accomodate placeholders. This is unfortunate as it reduces the protection offered by the schema file when editing configurations.
<?xml version="1.0" encoding="UTF-8"?>
How about changing to special schema type 'propertyInt' which is union of placeholder property and int. I have included the sample schema here. Would be happy to provide a patch if needed. Thanks. <xsd:schema xmlns:this="http:///Test/MySchema.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http:///Test/MySchema.xsd"> <xsd:simpleType name="placeholderType"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\{.+\}" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="propertyInt"> <xsd:union memberTypes="this:placeholderType xsd:int"> </xsd:union> </xsd:simpleType> </xsd:schema> Thanks. We've discussed the possibility in the past of using regular expressions to define a placeholder, but this may cause incompatibility with future expression support which doesn't match this syntax. The quality of error reporting also drops drastically in most editors when a regular expression is used. We might introduce this as a fix for 2.0.4, but ultimately it will probably be the kind of thing that is best handled by Spring-aware tooling (such as STS).
I've made the port mapping use xsd:string for the time being. We'll revisit the use of placeholders and expressions in 2.1.
|
||||||||||||||||||||||||||||||||||||||||||||||