gtag Posted June 4, 2009 Posted June 4, 2009 MY XML structure looks like this: xmeml/bin/children/bin/children/clip bin/children is repreated because items exists in a folder (or bin), which exists inside another folder (or bin). Sometimes the path is "bin/children/clip" anbd sometimes it will be "bin/children/bin/children/bin/children/clip" is there anyway of doing this that will allow me to use one stylesheet for these different variations?
comment Posted June 4, 2009 Posted June 4, 2009 is there anyway of doing this What exactly would "this" be?
gtag Posted June 4, 2009 Author Posted June 4, 2009 clarification: is there a way of writing the XSLT so it knows to look inside of any "bin" or "children" tiers so I don't have to continually open my XML and figure out how many folders deep the XSLT needs to be.
comment Posted June 4, 2009 Posted June 4, 2009 I still don't know what's the purpose of the stylesheet. If you only want to select all clip elements, no matter where they are in the document hierarchy, you could use this path expression: //clip If that's not what you need, please elaborate.
gtag Posted June 4, 2009 Author Posted June 4, 2009 ok. here's an example of my stylesheet: <?xml version='1.0' encoding='UTF-8' ?> 0 and here are 2 XMLs. Notice that there is one more folder level on number 2. #1: ?xml version="1.0" encoding="UTF-8"?> 9F8005E8-25F1-4178-B133-C04DD9EA6998 add SCENE_04 3B4C5EFC-CD7A-401C-BF82-33DF06FB1D86 add 0008ZD #2 ?xml version="1.0" encoding="UTF-8"?> F27341D8-63C8-433E-9328-FEA0DE738017 add ACT_1 7CB39BA5-B35A-4ED6-8B0B-ABFCE7F36C2E add *SCENE_X* I am wondering if I can write something into my XSLT so that the NUMBER of folders becomes irrelevant because at some point the "BIN/CHILDREN" structure yields to "clip", and that will always be the case. the variable is how deep the items are embedded within the folders. Am I making any better sense of this?
gtag Posted June 4, 2009 Author Posted June 4, 2009 and here is a graphic shot of each outline (the xml's)
gtag Posted June 4, 2009 Author Posted June 4, 2009 so I used: and that appears to have worked. Without xmexl it doesn't work. does that sound right?
comment Posted June 4, 2009 Posted June 4, 2009 so I used: and that appears to have worked. Without xmexl it doesn't work. does that sound right? No, I believe that: should work just as well. But since xmeml is the root element, it comes down to the same thing.
Recommended Posts
This topic is 5651 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now