Hello all,

Currently, the attribute node constructor fails because it can not accept a
node tree pointable and extract the text out of it. So Preston suggested an
alternative to add  fn:data during the translation of
DirectAttributeNodeConstructor.

Here is what I am confused about:

I found out that the best place to add this function would be while getting
the expression from enclosed expression. I have a conditional check in,
which tells me if the enclosed expression came in as a part of
DirectAttributeNodeConstructor. Since the enclosed expression is an
abstract syntax tree, I'm not sure how I would go about adding the fn:data
it.

So my best guess is that I am not in the right place to add this function.
Any insight into where exactly can I add this function, before runtime?

This is what the enclosed expression looks like:
 "org.apache.vxquery.xmlquery.ast.ExprNode": {
  "loc": {
    "sourceFileName": "../test_t17.xq",
    "lineNumber": 3,
    "columnNumber": 15
  },
  "expressions": [
    {
      "loc": {
        "@reference": "../../../loc"
      },
      "paths": [
        {
          "loc": {
            "@reference": "../../../../../loc"
          },
          "path": {
            "@class": "org.apache.vxquery.xmlquery.ast.FilterExprNode",
            "loc": {
              "@reference": "../../../../../../loc"
            },
            "expr": {
              "@class":
"org.apache.vxquery.xmlquery.ast.ParenthesizedExprNode",
              "loc": {
                "@reference": "../../../../../../../loc"
              },
              "expr": {
                "@class": "org.apache.vxquery.xmlquery.ast.ExprNode",
                "loc": {
                  "sourceFileName": "../test_t17.xq",
                  "lineNumber": 3,
                  "columnNumber": 16
                },
                "expressions": [
                  {
                    "loc": {
                      "@reference": "../../../loc"
                    },
                    "paths": [
                      {
                        "loc": {
                          "@reference": "../../../../../loc"
                        },
                        "path": {
                          "@class":
"org.apache.vxquery.xmlquery.ast.FilterExprNode",
                          "loc": {
                            "@reference": "../../../../../../loc"
                          },
                          "expr": {
                            "@class":
"org.apache.vxquery.xmlquery.ast.VarRefNode",
                            "loc": {
                              "@reference": "../../../../../../../loc"
                            },
                            "variable": {
                              "loc": {
                                "sourceFileName": "../test_t17.xq",
                                "lineNumber": 3,
                                "columnNumber": 17
                              },
                              "prefix": "",
                              "localName": "z"
                            }
                          },
                          "predicates": [
                          ]
                        }
                      }
                    ]
                  }
                ]
              }
            },
            "predicates": [
            ]
          }
        }
      ]
    }
  ]
}}


Thank you,
Shivani

Reply via email to