in Education by
I want to dynamically create variables with dynamic names for later use in my transform, but to do this I'd need to dynamically generate XSL and then run it in the same script. This is just a rough pseudo code example of what I'm looking for. Can I use XSL to dynamically build XSL to be run later in the same script? Note: our XML is transformed via a batch process running a CL XSL transform engine; so just referencing an XSL stylesheet in the XSL document isn't an option. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
XSLT has a special built-in feature that supports generating output, which is XSLT itself. This is the XSLT directive. As explaiened by the XSLT 1.0 Spec.: " <!-- Category: top-level-element --> A stylesheet can use the xsl:namespace-alias element to declare that one namespace URI is an alias for another namespace URI. When a literal namespace URI has been declared to be an alias for another namespace URI, then the namespace URI in the result tree will be the namespace URI that the literal namespace URI is an alias for, instead of the literal namespace URI itself. The xsl:namespace-alias element declares that the namespace URI bound to the prefix specified by the stylesheet-prefix attribute is an alias for the namespace URI bound to the prefix specified by the result-prefix attribute. Thus, the stylesheet-prefix attribute specifies the namespace URI that will appear in the stylesheet, and the result-prefix attribute specifies the corresponding namespace URI that will appear in the result tree. " Here is a small example of a transformation that generates an xsl:stylesheet containing an xsl:variable, which is constructed in the wanted way: When this transformation is applied on the following XML document: myValue the wanted result is produced: myValue Then the next step will be to launch in your "script" this dynamically generated XSLT transformation.

Related questions

0 votes
    I want to dynamically create variables with dynamic names for later use in my transform, but to do this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 8, 2022 in Education by JackTerrance
0 votes
    The ____ lock allows concurrent transactions to access the same row as long as they require the use of ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Q.2 Which mode of IPsec should you use to assure the security and confidentiality of data within the same LAN? A. ESP ... AH transport mode C. AH tunnel mode D. ESP tunnel mode...
asked Mar 12, 2023 in Technology by JackTerrance
0 votes
    I need to work with an ajax powered web page so I can pass an id or ids in the URL and it ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    _________ generate summary statistics of different variables in the data frame, possibly within strata. (a) rename ( ... R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    The _________ function is used to generate summary statistics from the data frame within strata defined by a ... R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I have one script and many websites, because they are on the same server how can I execute same ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I have one script and many websites, because they are on the same server how can I execute same ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    What is the process of defining two or more methods within same class that have same name but different ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    write a shell script to generate all combination of 1 2 and 3 Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    write a shell script to generate all combination of 1 2 and 3 Select the correct answer from above options...
asked Dec 18, 2021 in Education by JackTerrance
0 votes
    I am receiving SOAP requests from a client that uses the Axis 1.4 libraries. The requests have the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 30, 2022 in Education by JackTerrance
0 votes
    I am receiving SOAP requests from a client that uses the Axis 1.4 libraries. The requests have the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    The method adopted by block cipher modes to generate unique ciphertexts even if the same plaintext is encrypted multiple times ... Vector (2)Random Keys (3)Padding (4)Blockchain...
asked Mar 19, 2021 in Technology by JackTerrance
...