add more information to profiling output (saxon96) #189

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@josteinaj
Contributor

josteinaj commented Jan 30, 2015

  • added xpl-href and xpl-line to profile elements
  • create profile element when invoking custom steps

Makes it easier to parse the profiling output from calabash.
For instance, I'm using this XSLT to compare the XProc document with the profiling XML and get a HTML report:
https://gist.github.com/josteinaj/2c43cc3ae43e30c1e791

add more information to profiling output
 - added xpl-href and xpl-line to profile elements
 - create profile element when invoking custom steps
@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Feb 4, 2015

I don't see why the change to XPipelineCall is necessary? In my profiles, I get entries for the user defined steps. I've improved it a bit in my patch so that the declared type is used as the type instead of "declare-step".

ndw commented on 472c244 Feb 4, 2015

I don't see why the change to XPipelineCall is necessary? In my profiles, I get entries for the user defined steps. I've improved it a bit in my patch so that the declared type is used as the type instead of "declare-step".

This comment has been minimized.

Show comment
Hide comment
@josteinaj

josteinaj Feb 4, 2015

Owner

If you invoke a user-defined step multiple times from within a pipeline, then you won't be able to easily determine which invocation the <profile> element refers to because it refers to the step declaration and not the step invocation. I think it is useful to have both.

Here's an example output with this patch:

<profile xmlns="http://xmlcalabash.com/ns/profile"
    timestamp="2015-02-03T11:29:04"
    episode="CB79a7f999584a08463897382d2d488d7"
    language="nb-NO"
    product-name="XML Calabash"
    product-version="1.0.23 (for Saxon 9.5.1.5/HE)"
    product-vendor="Norman Walsh"
    product-vendor-uri="http://xmlcalabash.com/"
    xproc-version="1.0"
    xpath-version="2.0"
    psvi-supported="false"
    type="{http://www.w3.org/ns/xproc}declare-step"
    name="main"
    xpl-href="bundle://25.0:1/xml/xproc/epub3-validate.xpl"
    xpl-line="4"
    total-time="115832"
    step-time="640">
    ...
    <profile type="{http://www.daisy.org/ns/pipeline/xproc}fileset-create"
        name="!1.13"
        xpl-href="bundle://25.0:1/xml/xproc/epub3-validate.xpl"
        xpl-line="53"
        total-time="351"
        step-time="0">
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            xpl-href="bundle://48.0:1/xml/xproc/fileset-create.xpl"
            xpl-line="4"
            total-time="351"
            step-time="1">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                xpl-href="bundle://48.0:1/xml/xproc/fileset-create.xpl"
                xpl-line="9"
                step-time="0"/>
    ...

In this example, px:fileset-create is defined in fileset-create.xpl but invoked from epub3-validate.xpl. If I call atomic steps from within epub3-validate.xpl, they will get a xpl-href and xpl-line referring to within epub3-validate.xpl. The user-defined step px:fileset-create though, would normally have xpl-href refer to fileset-create.xpl. By having also the invocation (px:fileset-create in epub3-validate.xpl) in addition to the declaration (p:declare-step in fileset-create.xpl) it is easy to analyze line-by-line what happens in each XProc document separately.

I don't know if that made sense...

Owner

josteinaj replied Feb 4, 2015

If you invoke a user-defined step multiple times from within a pipeline, then you won't be able to easily determine which invocation the <profile> element refers to because it refers to the step declaration and not the step invocation. I think it is useful to have both.

Here's an example output with this patch:

<profile xmlns="http://xmlcalabash.com/ns/profile"
    timestamp="2015-02-03T11:29:04"
    episode="CB79a7f999584a08463897382d2d488d7"
    language="nb-NO"
    product-name="XML Calabash"
    product-version="1.0.23 (for Saxon 9.5.1.5/HE)"
    product-vendor="Norman Walsh"
    product-vendor-uri="http://xmlcalabash.com/"
    xproc-version="1.0"
    xpath-version="2.0"
    psvi-supported="false"
    type="{http://www.w3.org/ns/xproc}declare-step"
    name="main"
    xpl-href="bundle://25.0:1/xml/xproc/epub3-validate.xpl"
    xpl-line="4"
    total-time="115832"
    step-time="640">
    ...
    <profile type="{http://www.daisy.org/ns/pipeline/xproc}fileset-create"
        name="!1.13"
        xpl-href="bundle://25.0:1/xml/xproc/epub3-validate.xpl"
        xpl-line="53"
        total-time="351"
        step-time="0">
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            xpl-href="bundle://48.0:1/xml/xproc/fileset-create.xpl"
            xpl-line="4"
            total-time="351"
            step-time="1">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                xpl-href="bundle://48.0:1/xml/xproc/fileset-create.xpl"
                xpl-line="9"
                step-time="0"/>
    ...

In this example, px:fileset-create is defined in fileset-create.xpl but invoked from epub3-validate.xpl. If I call atomic steps from within epub3-validate.xpl, they will get a xpl-href and xpl-line referring to within epub3-validate.xpl. The user-defined step px:fileset-create though, would normally have xpl-href refer to fileset-create.xpl. By having also the invocation (px:fileset-create in epub3-validate.xpl) in addition to the declaration (p:declare-step in fileset-create.xpl) it is easy to analyze line-by-line what happens in each XProc document separately.

I don't know if that made sense...

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Feb 4, 2015

Ok. I'll run a few more complex examples and see if I can convince myself. What I saw with the added output your patch provided was simply duplication of the profile elements.

ndw replied Feb 4, 2015

Ok. I'll run a few more complex examples and see if I can convince myself. What I saw with the added output your patch provided was simply duplication of the profile elements.

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Feb 5, 2015

Owner

Sorry, I'm still confused. Here's a pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:cx="http://xmlcalabash.com/ns/extensions"
                xmlns:pxp="http://exproc.org/proposed/steps"
                xmlns:pxf="http://exproc.org/proposed/steps/file"
                xmlns:h="http://www.w3.org/1999/xhtml"
                xmlns:my="http://example.com/my"
                version="1.0">
<p:input port="parameters" kind="parameter"/>
<p:output port="result"/>

<p:pipeline name="my-identity1" type="my:identity1">
  <p:identity name="my-id1-id"/>
</p:pipeline>

<p:pipeline name="my-identity1" type="my:identity2">
  <p:identity name="my-id2-id1"/>
  <p:identity name="my-id2-id2"/>
</p:pipeline>

<p:identity name="start">
  <p:input port="source">
    <p:inline><doc/></p:inline>
  </p:input>
</p:identity>

<my:identity1/>

<p:identity/>

<my:identity2/>

<p:identity/>

</p:declare-step>

And here's the trace I get:

<?xml version="1.0" encoding="UTF-8"?>
<profile xmlns="http://xmlcalabash.com/ns/profile"
         timestamp="2015-02-04T20:02:50"
         episode="CB81cd9cd2360c8d1f8d7c2ec1af3fefe"
         language="en-US"
         product-name="XML Calabash"
         product-version="1.0.23 (for Saxon 9.6.0.3/EE)"
         product-vendor="Norman Walsh"
         product-vendor-uri="http://xmlcalabash.com/"
         xproc-version="1.0"
         xpath-version="2.0"
         psvi-supported="true"
         type="{http://xmlcalabash.com/ns/extensions}anonymousType_1"
         name="!1"
         href="file:/projects/github/calabash/pipe.xpl"
         line="7"
         total-time="24"
         step-time="12">
   <profile type="{http://www.w3.org/ns/xproc}identity"
            name="start"
            href="file:/projects/github/calabash/pipe.xpl"
            line="20"
            step-time="7"/>
   <profile type="{http://example.com/my}identity1"
            name="my-identity1"
            href="file:/projects/github/calabash/pipe.xpl"
            line="11"
            total-time="2"
            step-time="1">
      <profile type="{http://www.w3.org/ns/xproc}identity"
               name="my-id1-id"
               href="file:/projects/github/calabash/pipe.xpl"
               line="12"
               step-time="1"/>
   </profile>
   <profile type="{http://www.w3.org/ns/xproc}identity"
            name="!1.7"
            href="file:/projects/github/calabash/pipe.xpl"
            line="28"
            step-time="0"/>
   <profile type="{http://example.com/my}identity2"
            name="my-identity1"
            href="file:/projects/github/calabash/pipe.xpl"
            line="15"
            total-time="2"
            step-time="1">
      <profile type="{http://www.w3.org/ns/xproc}identity"
               name="my-id2-id1"
               href="file:/projects/github/calabash/pipe.xpl"
               line="16"
               step-time="1"/>
      <profile type="{http://www.w3.org/ns/xproc}identity"
               name="my-id2-id2"
               href="file:/projects/github/calabash/pipe.xpl"
               line="17"
               step-time="0"/>
   </profile>
   <profile type="{http://www.w3.org/ns/xproc}identity"
            name="!1.9"
            href="file:/projects/github/calabash/pipe.xpl"
            line="32"
            step-time="1"/>
</profile>

That ... looks ... right, doesn't it?

Owner

ndw commented Feb 5, 2015

Sorry, I'm still confused. Here's a pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:cx="http://xmlcalabash.com/ns/extensions"
                xmlns:pxp="http://exproc.org/proposed/steps"
                xmlns:pxf="http://exproc.org/proposed/steps/file"
                xmlns:h="http://www.w3.org/1999/xhtml"
                xmlns:my="http://example.com/my"
                version="1.0">
<p:input port="parameters" kind="parameter"/>
<p:output port="result"/>

<p:pipeline name="my-identity1" type="my:identity1">
  <p:identity name="my-id1-id"/>
</p:pipeline>

<p:pipeline name="my-identity1" type="my:identity2">
  <p:identity name="my-id2-id1"/>
  <p:identity name="my-id2-id2"/>
</p:pipeline>

<p:identity name="start">
  <p:input port="source">
    <p:inline><doc/></p:inline>
  </p:input>
</p:identity>

<my:identity1/>

<p:identity/>

<my:identity2/>

<p:identity/>

</p:declare-step>

And here's the trace I get:

<?xml version="1.0" encoding="UTF-8"?>
<profile xmlns="http://xmlcalabash.com/ns/profile"
         timestamp="2015-02-04T20:02:50"
         episode="CB81cd9cd2360c8d1f8d7c2ec1af3fefe"
         language="en-US"
         product-name="XML Calabash"
         product-version="1.0.23 (for Saxon 9.6.0.3/EE)"
         product-vendor="Norman Walsh"
         product-vendor-uri="http://xmlcalabash.com/"
         xproc-version="1.0"
         xpath-version="2.0"
         psvi-supported="true"
         type="{http://xmlcalabash.com/ns/extensions}anonymousType_1"
         name="!1"
         href="file:/projects/github/calabash/pipe.xpl"
         line="7"
         total-time="24"
         step-time="12">
   <profile type="{http://www.w3.org/ns/xproc}identity"
            name="start"
            href="file:/projects/github/calabash/pipe.xpl"
            line="20"
            step-time="7"/>
   <profile type="{http://example.com/my}identity1"
            name="my-identity1"
            href="file:/projects/github/calabash/pipe.xpl"
            line="11"
            total-time="2"
            step-time="1">
      <profile type="{http://www.w3.org/ns/xproc}identity"
               name="my-id1-id"
               href="file:/projects/github/calabash/pipe.xpl"
               line="12"
               step-time="1"/>
   </profile>
   <profile type="{http://www.w3.org/ns/xproc}identity"
            name="!1.7"
            href="file:/projects/github/calabash/pipe.xpl"
            line="28"
            step-time="0"/>
   <profile type="{http://example.com/my}identity2"
            name="my-identity1"
            href="file:/projects/github/calabash/pipe.xpl"
            line="15"
            total-time="2"
            step-time="1">
      <profile type="{http://www.w3.org/ns/xproc}identity"
               name="my-id2-id1"
               href="file:/projects/github/calabash/pipe.xpl"
               line="16"
               step-time="1"/>
      <profile type="{http://www.w3.org/ns/xproc}identity"
               name="my-id2-id2"
               href="file:/projects/github/calabash/pipe.xpl"
               line="17"
               step-time="0"/>
   </profile>
   <profile type="{http://www.w3.org/ns/xproc}identity"
            name="!1.9"
            href="file:/projects/github/calabash/pipe.xpl"
            line="32"
            step-time="1"/>
</profile>

That ... looks ... right, doesn't it?

@josteinaj

This comment has been minimized.

Show comment
Hide comment
@josteinaj

josteinaj Feb 5, 2015

Contributor

The problem is not apparent with a single xpl file. Try this:

main.xpl

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:my="http://example.com/my" version="1.0">

    <p:import href="my-identity.xpl"/>

    <p:identity name="start">
        <p:input port="source">
            <p:inline>
                <doc/>
            </p:inline>
        </p:input>
    </p:identity>

    <p:group>
        <p:output port="result">
            <p:pipe port="result" step="identity2"/>
        </p:output>

        <my:identity name="identity1"/>

        <my:identity name="identity2">
            <p:input port="source">
                <p:pipe port="result" step="identity3"/>
            </p:input>
        </my:identity>

        <my:identity name="identity3">
            <p:input port="source">
                <p:pipe port="result" step="identity1"/>
            </p:input>
        </my:identity>

    </p:group>

    <p:sink/>

</p:declare-step>

my-identity.xpl

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:my="http://example.com/my" version="1.0" type="my:identity">
    <p:input port="source"/>
    <p:output port="result"/>
    <p:identity/>
</p:declare-step>

Here's the output including "href" and "line", but without <profile>s for custom step invocations:

<profile xmlns="http://xmlcalabash.com/ns/profile"
    timestamp="2015-02-05T10:32:48"
    episode="CB8e697a471985cee6319e3791c104d9b"
    language="nb-NO"
    product-name="XML Calabash"
    product-version="1.0.23 (for Saxon 9.5.1.5/HE)"
    product-vendor="Norman Walsh"
    product-vendor-uri="http://xmlcalabash.com/"
    xproc-version="1.0"
    xpath-version="2.0"
    psvi-supported="false"
    type="{http://www.w3.org/ns/xproc}declare-step"
    name="!1"
    href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
    line="2"
    total-time="10"
    step-time="3">
    <profile type="{http://www.w3.org/ns/xproc}identity"
        name="start"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="6"
        step-time="0"/>
    <profile type="{http://www.w3.org/ns/xproc}group"
        name="!1.3"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="14"
        total-time="7"
        step-time="4">
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
            line="2"
            total-time="1"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="5"
                step-time="1"/>
        </profile>
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
            line="2"
            total-time="1"
            step-time="1">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="5"
                step-time="0"/>
        </profile>
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
            line="2"
            total-time="0"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="5"
                step-time="0"/>
        </profile>
    </profile>
    <profile type="{http://www.w3.org/ns/xproc}sink"
        name="!1.4"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="35"
        step-time="0"/>
</profile>

Or in short:

main.xpl:2 - p:declare-step
    main.xpl:6 - p:identity
    main.xpl:14 - p:group
        my-identity.xpl:2 - p:declare-step
            my-identity.xpl:5 - p:identity
        my-identity.xpl:2 - p:declare-step
            my-identity.xpl:5 - p:identity
        my-identity.xpl:2 - p:declare-step
            my-identity.xpl:5 - p:identity
    main.xpl:35 - p:sink

There is no reference to main.xpl:19, main.xpl:21 or main.xpl:27 which is where the custom step is invoked. Only the default steps are referred to in main.xpl.

If you include the invocations you'll get something like this:

<profile xmlns="http://xmlcalabash.com/ns/profile"
    timestamp="2015-02-05T10:32:48"
    episode="CB8e697a471985cee6319e3791c104d9b"
    language="nb-NO"
    product-name="XML Calabash"
    product-version="1.0.23 (for Saxon 9.5.1.5/HE)"
    product-vendor="Norman Walsh"
    product-vendor-uri="http://xmlcalabash.com/"
    xproc-version="1.0"
    xpath-version="2.0"
    psvi-supported="false"
    type="{http://www.w3.org/ns/xproc}declare-step"
    name="!1"
    href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
    line="2"
    total-time="10"
    step-time="3">
    <profile type="{http://www.w3.org/ns/xproc}identity"
        name="start"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="6"
        step-time="0"/>
    <profile type="{http://www.w3.org/ns/xproc}group"
        name="!1.3"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="14"
        total-time="7"
        step-time="4">
        <profile type="{http://example.com/my}identity"
            name="identity1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
            line="19"
            total-time="1"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}declare-step"
                name="!1"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="2"
                total-time="1"
                step-time="0">
                <profile type="{http://www.w3.org/ns/xproc}identity"
                    name="!1.3"
                    href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                    line="5"
                    step-time="1"/>
            </profile>
        </profile>
        <profile type="{http://example.com/my}identity"
            name="identity3"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
            line="27"
            total-time="1"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}declare-step"
                name="!1"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="2"
                total-time="1"
                step-time="1">
                <profile type="{http://www.w3.org/ns/xproc}identity"
                    name="!1.3"
                    href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                    line="5"
                    step-time="0"/>
            </profile>
        </profile>
        <profile type="{http://example.com/my}identity"
            name="identity2"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
            line="21"
            total-time="1"
            step-time="1">
            <profile type="{http://www.w3.org/ns/xproc}declare-step"
                name="!1"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="2"
                total-time="0"
                step-time="0">
                <profile type="{http://www.w3.org/ns/xproc}identity"
                    name="!1.3"
                    href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                    line="5"
                    step-time="0"/>
            </profile>
        </profile>
    </profile>
    <profile type="{http://www.w3.org/ns/xproc}sink"
        name="!1.4"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="35"
        step-time="0"/>
</profile>

Or in short:

main.xpl:2 - p:declare-step
    main.xpl:6 - p:identity
    main.xpl:14 - p:group
        main.xpl:19 - my:identity
            my-identity.xpl:2 - p:declare-step
                my-identity.xpl:5 - p:identity
        main.xpl:27 - my:identity
            my-identity.xpl:2 - p:declare-step
                my-identity.xpl:5 - p:identity
        main.xpl:21 - my:identity
            my-identity.xpl:2 - p:declare-step
                my-identity.xpl:5 - p:identity
    main.xpl:35 - p:sink

Here, you get information about where in main.xpl the my:identity step were invoked. The reference to p:declare-step (or if you wish to use the @type instead as you mentioned) is still useful as it won't always be line 1, it could be defined in a library.

Contributor

josteinaj commented Feb 5, 2015

The problem is not apparent with a single xpl file. Try this:

main.xpl

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:my="http://example.com/my" version="1.0">

    <p:import href="my-identity.xpl"/>

    <p:identity name="start">
        <p:input port="source">
            <p:inline>
                <doc/>
            </p:inline>
        </p:input>
    </p:identity>

    <p:group>
        <p:output port="result">
            <p:pipe port="result" step="identity2"/>
        </p:output>

        <my:identity name="identity1"/>

        <my:identity name="identity2">
            <p:input port="source">
                <p:pipe port="result" step="identity3"/>
            </p:input>
        </my:identity>

        <my:identity name="identity3">
            <p:input port="source">
                <p:pipe port="result" step="identity1"/>
            </p:input>
        </my:identity>

    </p:group>

    <p:sink/>

</p:declare-step>

my-identity.xpl

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:my="http://example.com/my" version="1.0" type="my:identity">
    <p:input port="source"/>
    <p:output port="result"/>
    <p:identity/>
</p:declare-step>

Here's the output including "href" and "line", but without <profile>s for custom step invocations:

<profile xmlns="http://xmlcalabash.com/ns/profile"
    timestamp="2015-02-05T10:32:48"
    episode="CB8e697a471985cee6319e3791c104d9b"
    language="nb-NO"
    product-name="XML Calabash"
    product-version="1.0.23 (for Saxon 9.5.1.5/HE)"
    product-vendor="Norman Walsh"
    product-vendor-uri="http://xmlcalabash.com/"
    xproc-version="1.0"
    xpath-version="2.0"
    psvi-supported="false"
    type="{http://www.w3.org/ns/xproc}declare-step"
    name="!1"
    href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
    line="2"
    total-time="10"
    step-time="3">
    <profile type="{http://www.w3.org/ns/xproc}identity"
        name="start"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="6"
        step-time="0"/>
    <profile type="{http://www.w3.org/ns/xproc}group"
        name="!1.3"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="14"
        total-time="7"
        step-time="4">
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
            line="2"
            total-time="1"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="5"
                step-time="1"/>
        </profile>
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
            line="2"
            total-time="1"
            step-time="1">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="5"
                step-time="0"/>
        </profile>
        <profile type="{http://www.w3.org/ns/xproc}declare-step"
            name="!1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
            line="2"
            total-time="0"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}identity"
                name="!1.3"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="5"
                step-time="0"/>
        </profile>
    </profile>
    <profile type="{http://www.w3.org/ns/xproc}sink"
        name="!1.4"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="35"
        step-time="0"/>
</profile>

Or in short:

main.xpl:2 - p:declare-step
    main.xpl:6 - p:identity
    main.xpl:14 - p:group
        my-identity.xpl:2 - p:declare-step
            my-identity.xpl:5 - p:identity
        my-identity.xpl:2 - p:declare-step
            my-identity.xpl:5 - p:identity
        my-identity.xpl:2 - p:declare-step
            my-identity.xpl:5 - p:identity
    main.xpl:35 - p:sink

There is no reference to main.xpl:19, main.xpl:21 or main.xpl:27 which is where the custom step is invoked. Only the default steps are referred to in main.xpl.

If you include the invocations you'll get something like this:

<profile xmlns="http://xmlcalabash.com/ns/profile"
    timestamp="2015-02-05T10:32:48"
    episode="CB8e697a471985cee6319e3791c104d9b"
    language="nb-NO"
    product-name="XML Calabash"
    product-version="1.0.23 (for Saxon 9.5.1.5/HE)"
    product-vendor="Norman Walsh"
    product-vendor-uri="http://xmlcalabash.com/"
    xproc-version="1.0"
    xpath-version="2.0"
    psvi-supported="false"
    type="{http://www.w3.org/ns/xproc}declare-step"
    name="!1"
    href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
    line="2"
    total-time="10"
    step-time="3">
    <profile type="{http://www.w3.org/ns/xproc}identity"
        name="start"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="6"
        step-time="0"/>
    <profile type="{http://www.w3.org/ns/xproc}group"
        name="!1.3"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="14"
        total-time="7"
        step-time="4">
        <profile type="{http://example.com/my}identity"
            name="identity1"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
            line="19"
            total-time="1"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}declare-step"
                name="!1"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="2"
                total-time="1"
                step-time="0">
                <profile type="{http://www.w3.org/ns/xproc}identity"
                    name="!1.3"
                    href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                    line="5"
                    step-time="1"/>
            </profile>
        </profile>
        <profile type="{http://example.com/my}identity"
            name="identity3"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
            line="27"
            total-time="1"
            step-time="0">
            <profile type="{http://www.w3.org/ns/xproc}declare-step"
                name="!1"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="2"
                total-time="1"
                step-time="1">
                <profile type="{http://www.w3.org/ns/xproc}identity"
                    name="!1.3"
                    href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                    line="5"
                    step-time="0"/>
            </profile>
        </profile>
        <profile type="{http://example.com/my}identity"
            name="identity2"
            href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
            line="21"
            total-time="1"
            step-time="1">
            <profile type="{http://www.w3.org/ns/xproc}declare-step"
                name="!1"
                href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                line="2"
                total-time="0"
                step-time="0">
                <profile type="{http://www.w3.org/ns/xproc}identity"
                    name="!1.3"
                    href="file:/home/jostein/Skrivebord/ndw-issue-189/my-identity.xpl"
                    line="5"
                    step-time="0"/>
            </profile>
        </profile>
    </profile>
    <profile type="{http://www.w3.org/ns/xproc}sink"
        name="!1.4"
        href="file:/home/jostein/Skrivebord/ndw-issue-189/main.xpl"
        line="35"
        step-time="0"/>
</profile>

Or in short:

main.xpl:2 - p:declare-step
    main.xpl:6 - p:identity
    main.xpl:14 - p:group
        main.xpl:19 - my:identity
            my-identity.xpl:2 - p:declare-step
                my-identity.xpl:5 - p:identity
        main.xpl:27 - my:identity
            my-identity.xpl:2 - p:declare-step
                my-identity.xpl:5 - p:identity
        main.xpl:21 - my:identity
            my-identity.xpl:2 - p:declare-step
                my-identity.xpl:5 - p:identity
    main.xpl:35 - p:sink

Here, you get information about where in main.xpl the my:identity step were invoked. The reference to p:declare-step (or if you wish to use the @type instead as you mentioned) is still useful as it won't always be line 1, it could be defined in a library.

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Feb 5, 2015

Owner

Thank you, I see your point now.

Owner

ndw commented Feb 5, 2015

Thank you, I see your point now.

ndw added a commit that referenced this pull request Feb 5, 2015

Fix issue #189 by adding href and line attributes to profile elements…
… and making the type of user defined steps more useful

ndw added a commit that referenced this pull request Feb 5, 2015

More updates for issue #189: support p:pipeline as an alias for p:dec…
…lare-step; output profile calls for custom step invocations

ndw added a commit that referenced this pull request Feb 5, 2015

Fix issue #189 by adding href and line attributes to profile elements…
… and making the type of user defined steps more useful

ndw added a commit that referenced this pull request Feb 5, 2015

More updates for issue #189: support p:pipeline as an alias for p:dec…
…lare-step; output profile calls for custom step invocations
@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Apr 24, 2015

Owner

I think this is resolved. Please reopen if I'm wrong.

Owner

ndw commented Apr 24, 2015

I think this is resolved. Please reopen if I'm wrong.

@ndw ndw closed this Apr 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment