1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: parse.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
39 #include "filebuff.hxx"
40 #include "../support/sistr.hxx"
41 #include "../support/list.hxx"
51 typedef XmlElement
* (*F_CREATE
)(const Simstr
&);
54 XmlElement
& o_rDocumentData
);
58 const char * i_sFilename
);
61 const char * i_sFilename
);
64 const char * PureText() const { return aFile
.operator const char*(); }
67 DynamicList
<XmlElement
> &
69 const Simstr
& i_sElementName
);
70 void Parse_FreeChoice(
71 DynamicList
<XmlElement
> &
74 ListElement
& o_rListElem
);
77 const Simstr
& i_sElementName
,
78 bool i_bReverseName
);
79 void Parse_MultipleText(
80 List
<Simstr
> & o_rTexts
,
81 const Simstr
& i_sElementName
,
82 bool i_bReverseName
);
84 Simstr
& o_sAttrValue
,
85 const Simstr
& i_sElementName
,
86 const Simstr
& i_sAttrName
);
87 void Parse_MultipleAttr(
88 List
<Simstr
> & o_rAttrValues
,
89 const Simstr
& i_sElementName
,
94 void Parse_XmlDeclaration();
98 Simstr
& o_rAttrValue
,
99 Simstr
& o_rAttrName
);
101 const char * i_sComparedText
);
103 const char * i_sTagName
);
105 const char * i_sTagName
);
116 bool i_bReverseName
= false );
117 /// @return false in case of empty tag with no attributes.
118 bool CheckAndPassBeginTag(
119 const char * i_sElementName
);
120 void CheckAndPassEndTag(
121 const char * i_sElementName
);
122 /// @precond IsBeginTag() == true.
123 bool IsAbsoluteEmpty() const;
127 const char * i_sText
);
135 XmlElement
* pDocumentData
;