0

I'm looking for a way to restrict character pair denoting an unicode character from appearing in the resulting XML. This character pair is &# (for example &#xBB) . I'm trying to create a pattern in the XSD schema - to match if such character pair (&#) appear anywhere in the XML file. If such pair appears then the XML validation should fail . The restriction should also take into account the fact that the minimum string length equals to 1 and maximum to 79.

I've been trying to use following regex patternvalue="[^&#]{1,79}" but it does not work as expected. XML by design are encoded in the ISO-8859-2 format so any kind of unicode entries are not permitted.

What is the correct regex to establish such restriction ?

Thank You in advance. Jack

4

1 に答える 1

0

XML スキーマが参照して検証するデータは、エンティティおよび文字参照の展開後のデータです。したがって、XML ファイルに含まれている場合»、スキーマ プロセッサが認識するのは». »も禁止せずに XSD 禁止を行うことはできません»

于 2013-06-07T20:19:14.737 に答える