1  <html>
2  <head><title>Processing Section  addsection.asp</title></head>
3  <body>
4  <%@LANGUAGE = VBScript %>
5  <%
6  rem insert a  new article
7  optargs = "body_text ='" & request.form("body_text") &
      "' headline='" & request.form("headline") & "' subheadline='" &
      request.form("subheadline") & "'"""
8  set result = sess.run("DB1:Main/add_article",optargs)
9  response.write "<p>Calling add_article " & result.data
10 
11         sect_subsectArray = request.form("sect_subsectArray")
12  rem   Alter record delimiters
13         sect_subsectArray = replace(sect_subsectArray,"&#198;","")
14         sect_subsectTable = split(sect_subsectArray,"")
15         For Each sect_subsect in sect_subsectTable
16            ssindexArray = split(sect_subsect, "/")
17            section = ssindexArray(0)
18             subsection = ssindexArray(1)
19            optargs = "XQL_query=
              '/articleCollection/article[-1]/advanced[-1]' section ='" 
                 & section & "' subsection = '" & subsection &"' """
20            set result = sess.run("DB1:Main/add_section_subsection",
              optargs)
21            response.write "<p>Calling add_section_subsection " & 
              result.data
22         Next
23  %>
24  </body>
25  </html>