IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: JeffO99
About
User Name: JeffO99
Forum Rank: Newbie
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Sunday, November 27, 2016
Last Visit: Tuesday, January 16, 2018 12:09:10 AM
Number of Posts: 3
[0.02% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: xpath for collection(), bridging folder gap?
Posted: Tuesday, January 16, 2018 12:09:09 AM
The solution had been on xmlplease.com, but it's still available on the web archive:

http://web.archive.org/web/20170424174247/http://www.xmlplease.com:80/collection
Topic: xpath for collection(), bridging folder gap?
Posted: Tuesday, November 28, 2017 6:05:29 PM
I'm using XMLSpy 2016 to generate a collection.xml file where the source files (WCAG2 xml) are in subdirectories.

Can't get the two xpath expressions right.

Here's the structure ...

Code:
techniques
    aria.xml
    css.xml

    aria
        ARIA1.xml
            fyi: <technique id="ARIA1">..</technique>
        ARIA2.xml   
    css
        CSS1.xml
        CSS2.xml

In case it helps ...

the main directory contains files named after the subdirectories and each file's root element contains the file name as its @id.

Desired output:

Code:
<collection>
    <doc href="aria/ARIA1.xml"/>
    <doc href="aria/ARIA2.xml"/>
    <doc href="css/CSS1.xml"/>
    <doc href="css/CSS2.xml"/>
</collection>


My busted XSLT uses //*.xml in the collection expression, which is a guess, and my doc expression only works for these files when they're in the same directory, not spread across a dozen.

Code:
<xsl:variable name="files" select="collection('D:/data/main//*.xml')"/>

<collection>
    <xsl:for-each select="$files">
        <doc href="{concat('main/',./element()[1]/@id,'.xml')}"/>
    </xsl:for-each>
</collection>


Thanks!
Topic: 2017 feature undocumented: New command to jump to parent element in Text View
Posted: Sunday, November 27, 2016 8:32:14 PM
Brilliant new feature! I'd love to try it, but Altova seems to have overlooked publishing the actual keystrokes needed.

The info should be here: http://manual.altova.com/xmlspy/spyenterprise/index.html?keyboard.htm

I've Googled for a good 20 minutes, found squat.

So, what is the command for this brilliant new feature?

Thanks!

Jeff

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.