Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base URI is lost through p:xslt #94

Closed
josteinaj opened this issue Mar 22, 2013 · 1 comment
Closed

Base URI is lost through p:xslt #94

josteinaj opened this issue Mar 22, 2013 · 1 comment

Comments

@josteinaj
Copy link
Contributor

@josteinaj josteinaj commented Mar 22, 2013

So this pipeline:

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
    <p:input port="source">
        <p:inline>
            <doc xml:base="file:/tmp/"/>
       </p:inline>
    </p:input>
    <p:output port="result"/>
    <p:delete match="/*/@xml:base"/>
    <p:add-attribute match="/*" attribute-name="base-before">
        <p:with-option name="attribute-value" select="base-uri(/*)"/>
    </p:add-attribute>
    <p:xslt>
        <p:input port="parameters">
            <p:empty/>
        </p:input>
        <p:input port="stylesheet">
            <p:inline>
                <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
                    <xsl:template match="/">
                        <xsl:copy-of select="/"/>
                    </xsl:template>
                </xsl:stylesheet>
            </p:inline>
        </p:input>
    </p:xslt>
    <p:add-attribute match="/*" attribute-name="base-after">
        <p:with-option name="attribute-value" select="base-uri(/*)"/>
    </p:add-attribute>
</p:declare-step>

Gives me this on the output port:

<doc base-after="file:/home/jostein/preserve-base-test.xpl" base-before="file:/tmp/"/>

I would expect to get this:

<doc base-after="file:/tmp/" base-before="file:/tmp/"/>

See also the discussion on the xproc-dev list: http://lists.w3.org/Archives/Public/xproc-dev/2013Mar/0013.html

(Tested on version 1.0.8.94 of calabash)

@ndw
Copy link
Owner

@ndw ndw commented Mar 22, 2013

There does seem to be something odd here. I'm investigating.

@ndw ndw closed this Mar 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.