use f_office_xml::{Document, NodeId};
pub const W: &str = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
pub const W14: &str = "http://schemas.microsoft.com/office/word/2010/wordml";
pub const R: &str = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
pub const WP: &str = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";
pub const WP14: &str = "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing";
pub const WPS: &str = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
pub const WPG: &str = "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup";
pub const MC: &str = "http://schemas.openxmlformats.org/markup-compatibility/2006";
pub const A: &str = "http://schemas.openxmlformats.org/drawingml/2006/main";
pub const PIC: &str = "http://schemas.openxmlformats.org/drawingml/2006/picture";
pub const V: &str = "urn:schemas-microsoft-com:vml";
pub const W10: &str = "urn:schemas-microsoft-com:office:word";
pub const O: &str = "urn:schemas-microsoft-com:office:office";
pub const DGM: &str = "http://schemas.openxmlformats.org/drawingml/2006/diagram";
pub const DSP: &str = "http://schemas.microsoft.com/office/drawing/2008/diagram";
pub const C: &str = "http://schemas.openxmlformats.org/drawingml/2006/chart";
pub const CX: &str = "http://schemas.microsoft.com/office/drawing/2014/chartex";
pub const WPC: &str = "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas";
pub const W16SE: &str = "http://schemas.microsoft.com/office/word/2015/wordml/symex";
pub const M: &str = "http://schemas.openxmlformats.org/officeDocument/2006/math";
pub const CUSTOM_PROPERTIES: &str =
"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";
pub const VT: &str = "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes";
pub const REL_CUSTOM_PROPERTIES: &str = "/custom-properties";
pub const W_STRICT: &str = "http://purl.oclc.org/ooxml/wordprocessingml/main";
pub const STRICT_ALIASES: &[(&str, &str)] = &[
("http://purl.oclc.org/ooxml/drawingml/diagram", DGM),
("http://purl.oclc.org/ooxml/drawingml/chart", C),
(W_STRICT, W),
("http://purl.oclc.org/ooxml/drawingml/main", A),
("http://purl.oclc.org/ooxml/drawingml/picture", PIC),
("http://purl.oclc.org/ooxml/officeDocument/relationships", R),
("http://purl.oclc.org/ooxml/officeDocument/math", M),
(
"http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing",
WP,
),
];
pub const REL_STYLES: &str = "/styles";
pub const REL_THEME: &str = "/theme";
pub const REL_SETTINGS: &str = "/settings";
pub const REL_WEB_SETTINGS: &str = "/webSettings";
pub const REL_FOOTNOTES: &str = "/footnotes";
pub const REL_COMMENTS: &str = "/comments";
pub const REL_COMMENTS_EXTENDED: &str = "/commentsExtended";
pub const W15: &str = "http://schemas.microsoft.com/office/word/2012/wordml";
pub const WNE: &str = "http://schemas.microsoft.com/office/word/2006/wordml";
pub fn is_text_box_content(doc: &Document, node: NodeId) -> bool {
doc.is(node, W, "txbxContent") || doc.is(node, WNE, "txbxContent")
}
pub fn text_box_content(doc: &Document, text_box: NodeId) -> Option<NodeId> {
doc.child_elements(text_box)
.find(|&child| is_text_box_content(doc, child))
}
pub const REL_ENDNOTES: &str = "/endnotes";
pub const REL_NUMBERING: &str = "/numbering";
pub const REL_FONT_TABLE: &str = "/fontTable";
pub const NOTE: &str = "urn:f-office:note";