如何確定符合給定模式的XML文件中的最大字符數?

[英]How could one determine the maximum character count in an XML file conforming to a given schema?


I need to determine the theoretical maximum character count, including tags, of an XML file conforming to a given XSD schema and am simply blanking on how one might go about that. I am open to XSLT based solutions or any of the .NET XML methods.

我需要確定符合給定XSD模式的XML文件的理論最大字符數(包括標記),並簡單地不考慮如何實現這一點。我歡迎基於XSLT的解決方案或任何。net XML方法。

Thanks in advance

謝謝提前

1 个解决方案

#1


0  

The theoretical maximum character count is unlimited.

理論上最大字符數是無限的。

An XML file that conforms to a schema that only allows a restricted set of content could still contain lots of comments, processing instructions, declared (but unused) namespaces, and entities.

符合只允許受限制內容集的模式的XML文件仍然可以包含許多注釋、處理指令、聲明(但未使用)的名稱空間和實體。

All of those things would contribute to the character count of the XML instance file and are beyond the constraints of the XSD.

所有這些都將有助於XML實例文件的字符計數,並且超出了XSD的約束。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2011/10/06/7252483e09d96ace9eabd0c2bcd6b16d.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com