ZVON > >
Prev | Next |

3. Escaping

This tutorial is obsolete. Please, use the new one.

Description

What does it mean - escaping? If there are some forbidden characters in your expression, you must deal with them somehow.




XML escaping
When XPointer appears in XML document, special characters must be escaped according to directions in XML. So if you want to use characters < or & in XPointer expression, you have to escape them using &lt; and &amp;.

 <link xmlns:xlink="http://www.w3.org/2000/xlink" xlink:type="simple" xlink:href="mydocument.xml#xpointer(//AAA/BBB position() &lt; 2)">
 </link>


XPointer escaping
XPointer requires balanced parantheses. Any unbalanced parenthesis must be escaped using circumflex (^). If you want, for example, to match left paranthesis, you must escape it using '^('.

 <link xmlns:xlink="http://www.w3.org/2000/xlink" xlink:type="simple" xlink:href="mydocument.xml#xpointer(string-range('^(text in'))">
 </link>


URI escaping
Also characters in URI must be escaped, but this is rather developers' task. If you are interested in this, see standard.



_____________________________________________
Reference Search | Sitemap | XML Glossary       ZVON | Systinet




Related sites:
  • dotNet Slackers - Your latest resource for ASP.NET
  • Dotnet Spider - Outsourcing and Offshore software development in India
  • XML - Xselerator, XSL Editor, BizTalk Utilities, XML Tutorials, Learn XML
  • Planet Source Code - The largest public source code database on the Internet
answering service VoIP Internettelefonie DSL, SDSL, ADSL