59 const WideString& wsCondition,
65 WideStringView wsNameView = wsName.AsStringView();
66 bool bIsClassName =
false;
68 if (!wsNameView.IsEmpty() && wsNameView[0] ==
'!') {
69 wsNameView = wsNameView.Last(wsNameView.GetLength() - 1);
70 m_pCreateParent = ToNode(
71 pScriptContext->GetDocument()->GetXFAObject(XFA_HASHCODE_Datasets));
73 if (!wsNameView.IsEmpty() && wsNameView[0] ==
'#') {
75 wsNameView = wsNameView.Last(wsNameView.GetLength() - 1);
77 if (wsNameView.IsEmpty())
80 if (m_iCreateCount == 0)
84 XFA_Element eType = XFA_GetElementByName(wsNameView);
88 for (size_t i = 0; i < m_iCreateCount; ++i) {
89 CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eType);
91 m_pCreateParent->InsertChildAndNotify(pNewNode,
nullptr);
92 if (i == m_iCreateCount - 1) {
93 m_pCreateParent = pNewNode;
103 for (size_t i = 0; i < m_iCreateCount; ++i) {
104 CXFA_Node* pNewNode = m_pCreateParent->CreateSamePacketNode(eClassType);
106 pNewNode->JSObject()->SetAttributeByEnum(
XFA_Attribute::Name,
107 WideString(wsNameView),
false);
109 m_pCreateParent->InsertChildAndNotify(pNewNode,
nullptr);
110 if (i == m_iCreateCount - 1) {
111 m_pCreateParent = pNewNode;
118 m_pCreateParent =
nullptr;