
    ܖi                     d    d Z ddgZddlmZ  ed      ZdZdedefd	Z ed
      Z	dZ
dedefdZy)z
XML-specific functionality.
xs_normalizedStringxs_token    )compilez\r\n|\t|\n|\r sreturnc                 6    t         j                  t        |       S )uA  Make a ``normalizedString``, adhering XML spec.

    .. epigraph::
       *normalizedString* represents white space normalized strings.
       The `·value space· <https://www.w3.org/TR/xmlschema-2/#dt-value-space>`_ of normalizedString is the set of
       strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.
       The `·lexical space· <https://www.w3.org/TR/xmlschema-2/#dt-lexical-space>`_ of normalizedString is the set of
       strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.
       The `·base type· <https://www.w3.org/TR/xmlschema-2/#dt-basetype>`_ of normalizedString is
       `string <https://www.w3.org/TR/xmlschema-2/#string>`_.

       -- the `XML schema spec <http://www.w3.org/TR/xmlschema-2/#normalizedString>`_
    )$__NORMALIZED_STRING_FORBIDDEN_SEARCHsub%__NORMALIZED_STRING_FORBIDDEN_REPLACEr   s    W/var/www/html/content-pipeline/venv/lib/python3.12/site-packages/py_serializable/xml.pyr   r       s     033-	     z {2,}c                 d    t         j                  t        t        |       j	                               S )u  Make a ``token``, adhering XML spec.

    .. epigraph::
       *token* represents tokenized strings.
       The `·value space· <https://www.w3.org/TR/xmlschema-2/#dt-value-space>`_ of token is the set of strings that do
       not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or
       trailing spaces (#x20) and that have no internal sequences of two or more spaces.
       The `·lexical space· <https://www.w3.org/TR/xmlschema-2/#dt-lexical-space>`_ of token is the set of strings that
       do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or
       trailing spaces (#x20) and that have no internal sequences of two or more spaces.
       The `·base type· <https://www.w3.org/TR/xmlschema-2/#dt-basetype>`_ of token is
       `normalizedString <https://www.w3.org/TR/xmlschema-2/#normalizedString>`_.

       -- the `XML schema spec <http://www.w3.org/TR/xmlschema-2/#token>`_
    )__TOKEN_MULTISTRING_SEARCHr   __TOKEN_MULTISTRING_REPLACEr   stripr   s    r   r   r   <   s+      &))#A$$&( (r   N)__doc____all__rer   
re_compiler
   r   strr   r   r   r    r   r   <module>r      sf   $ !*
- $ (22B'C $(+ %3 3 0 (1 ! ( ( (r   