williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Text node functions
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
|
williamr@2
|
21 |
|
williamr@2
|
22 |
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#ifndef XMLENGINE_TEXT_H_INCLUDED
|
williamr@2
|
25 |
#define XMLENGINE_TEXT_H_INCLUDED
|
williamr@2
|
26 |
|
williamr@2
|
27 |
#include "xmlengcharacterdata.h"
|
williamr@2
|
28 |
|
williamr@2
|
29 |
|
williamr@2
|
30 |
|
williamr@2
|
31 |
/**
|
williamr@2
|
32 |
* The TXmlEngTextNode interface inherits from TXmlEngCharacterData and represents the textual content
|
williamr@2
|
33 |
* (termed "character data" in XML) of an Element or TXmlEngAttr.
|
williamr@2
|
34 |
*
|
williamr@2
|
35 |
* If there is no markup inside an element's content, the text is contained in a single object
|
williamr@2
|
36 |
* of the TXmlEngTextNode interface that is the only child of the element. If there is markup,
|
williamr@2
|
37 |
* it is parsed into the information items (elements, comments, etc.) and TXmlEngTextNode nodes that
|
williamr@2
|
38 |
* form the list of children of the element.
|
williamr@2
|
39 |
*
|
williamr@2
|
40 |
* When a document is first made available via the DOM, there is only one TXmlEngTextNode node for each
|
williamr@2
|
41 |
* block of text. Users may create adjacent TXmlEngTextNode nodes that represent the contents of a given
|
williamr@2
|
42 |
* element without any intervening markup, but should be aware that there is no way to
|
williamr@2
|
43 |
* represent the separations between these nodes in XML or HTML, so they will not (in general)
|
williamr@2
|
44 |
* persist between DOM editing sessions.
|
williamr@2
|
45 |
*
|
williamr@2
|
46 |
* No lexical check is done on the content of a TXmlEngTextNode node and, depending on its position in
|
williamr@2
|
47 |
* the document, some characters must be escaped during serialization using character references;
|
williamr@2
|
48 |
* e.g. the characters "<&" if the textual content is part of an element or of an attribute,
|
williamr@2
|
49 |
* the character sequence "]]>" when part of an element, the quotation mark character " or
|
williamr@2
|
50 |
* the apostrophe character ' when part of an attribute.
|
williamr@2
|
51 |
*
|
williamr@2
|
52 |
* <b>DOM Level 3 spec:</b>
|
williamr@2
|
53 |
* <p>http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1312295772
|
williamr@2
|
54 |
*
|
williamr@2
|
55 |
* @lib XmlEngineDOM.lib
|
williamr@2
|
56 |
* @since S60 v3.1
|
williamr@2
|
57 |
*/
|
williamr@2
|
58 |
class TXmlEngTextNode : public TXmlEngCharacterData
|
williamr@2
|
59 |
{
|
williamr@2
|
60 |
public:
|
williamr@2
|
61 |
/**
|
williamr@2
|
62 |
* Default constructor
|
williamr@2
|
63 |
*
|
williamr@2
|
64 |
* @since S60 v3.1
|
williamr@2
|
65 |
*/
|
williamr@2
|
66 |
inline TXmlEngTextNode();
|
williamr@2
|
67 |
|
williamr@2
|
68 |
/**
|
williamr@2
|
69 |
* Check if element content is whitespace.
|
williamr@2
|
70 |
*
|
williamr@2
|
71 |
* @since S60 v3.1
|
williamr@2
|
72 |
* @return TRUE if is only whitespace
|
williamr@2
|
73 |
*/
|
williamr@2
|
74 |
IMPORT_C TBool IsElementContentWhitespace() const;
|
williamr@2
|
75 |
|
williamr@2
|
76 |
protected:
|
williamr@2
|
77 |
/**
|
williamr@2
|
78 |
* Constructor
|
williamr@2
|
79 |
*
|
williamr@2
|
80 |
* @since S60 v3.1
|
williamr@2
|
81 |
* @param aInternal Text node pointer
|
williamr@2
|
82 |
*/
|
williamr@2
|
83 |
inline TXmlEngTextNode(void* aInternal);
|
williamr@2
|
84 |
};
|
williamr@2
|
85 |
|
williamr@2
|
86 |
|
williamr@2
|
87 |
|
williamr@2
|
88 |
#include "xmlengtext.inl"
|
williamr@2
|
89 |
|
williamr@2
|
90 |
#endif /* XMLENGINE_TEXT_H_INCLUDED */
|