[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xslt create a variable from external xml file
o;?Dear Phillip and all,I understand the frustration because I see this sort of problem very frequently when working with my students. It is difficult to explain the whole context of the problem. When working with variables or params that store document nodes, you need to be absolutely clear about the location of your XSLT file relative to the documents it is reading. I believe the problem is likely to be in the relative file path. I also recommend Gerritbs advice to try calling the doc() function instead of the document() node, but as I write this I confess I am not clear on the differencebjust that I reach into external documents a lot in my work and doc() works for me. And usually when I am not getting any results the first thing I check is whether I gave properly understood the path from the XSLT to the document Ibm trying to make it read. The next thing I check is whether that document is in a namespace, because that is another common point of failure for XSLT to read an input file. If that file is defined on its root with xmlns="https://my.special.namespace", you will need to add an xpath-default-namespace to the XSLTbs root element: xpath-default-namespace="https://my.special.namespace" If you are reading in lots of files with multiple namespaces, XSLT needs to know about each one. For now though, it seems to me that two likely sources of input error are defining your file path relative to the XSLT, and checking whether your file is defined in a namespace. Good luckband yes, XSLT can handle documents stored in variables. You can fix this! Elisa Elisa Beshero-Bondar, PhD (she/they)Chair, TEI Technical CouncilProgram Chair of Digital Media, Arts, and Technology | Professor of Digital Humanities | Director of the Digital Humanities Lab at Penn State Erie, The Behrend College Typeset by hand on my iPhone On Aug 27, 2023, at 8:08 AM, Michael Kay michaelkay90@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: o;? I have tried everything and Ibm unable to get the values from the external xml file. That's not useful information. If you tell us one thing you tried, describe it precisely, and tell us how it failed, then we can help you move forward. Michael KaySaxonica XSL-List info and archiveEasyUnsubscribe (by email) XSL-List info and archiveEasyUnsubscribe (by email)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|