Background Color:
 
Background Pattern:
Reset
Search

Forum

Please Log In

We want you to contribute! 

This forum is a moderated environment. 
We try to keep it neat and tidy. In order to access the forum content we would like you to either or register.

HomeHomeScryberScryberIssues and Defe...Issues and Defe...xml-node-data fails to bind XML data from item collectionxml-node-data fails to bind XML data from item collection
Previous
 
Next
New Post
11/5/2015 1:48 PM
 

Using v0.9.0.0 only the deprecated xml-data attribute works with binding XML data using the item collection, not the xml-node-data attribute. 

For example, this works:

<data:XMLDataSource id="MyData" xml-data="{item:my-data}"></data:XMLDataSource>

But this does not:

<data:XMLDataSource id="MyData" xml-node-data="{item:my-data}"></data:XMLDataSource>
 
New Post
11/7/2015 3:54 PM
 

Hi

If you download the examples from CodePlex - http://scrybersamples.codeplex.com

These use the xml-node-data against version 0.9 of the nuget package.

Can you do me a favour and let me know where you have the libraries from and I can take a look to make sure they are up to date.

Thanks

 
New Post
11/9/2015 1:45 PM
 

I'm running v0.9 that I installed from NuGet.

 
New Post
11/10/2015 8:08 AM
 

Thanks Tony

 

I'm having trouble replicating. Downloaded the Nuget again and forced the add from the VSIX templates and both appear to be including the xml-node-data attribute on the XMLDataSource.

The schema for this should be..

 

 <!-- 

    XMLDataSource

  -->

 

  <xs:complexType name="Binding-XMLDataSourceType" >

    <xs:complexContent>

      <xs:extension base="pdf:ScryberDataSourceBaseType" >

        <xs:all minOccurs="0" maxOccurs="1" >

          <xs:element name="Transform" minOccurs="0" maxOccurs="1" type="Binding-XSLTransform" form="unqualified" />

          <xs:element name="Namespaces" minOccurs="0" maxOccurs="1" type="Binding-XMLNamespaces" form="unqualified" />

          <xs:element name="Commands" minOccurs="0" maxOccurs="1" type="Binding-XMLCommandList" form="unqualified" />

        </xs:all>

        <xs:attributeGroup ref="DataElementAttributes" />

        <xs:attribute name="source-path" type="pdf:BindableStringType" use="optional" />

        <xs:attribute name="xpath-data" type="pdf:BindableAttributeType" use="optional" />

        <xs:attribute name="xml-node-data" type="pdf:BindableAttributeType" use="optional" />

        <xs:attribute name="cache-duration" type="pdf:BindableIntgerType" use="optional" />

        <xs:attribute name="execute" type="pdf:BindableStringType" use="optional" />

      </xs:extension>

    </xs:complexContent>

  </xs:complexType>

 

  <xs:element name="XMLDataSource" type="Binding-XMLDataSourceType" substitutionGroup="pdf:ScryberDataSourceBase" />


If you remove the package and then re-install from Visual Studio does this solve the issue?

 
New Post
11/11/2015 1:36 PM
 

The schema isn't the issue. The problem is when binding a dynamic xml data source using xml-node-data an error is thrown during the ParseDocument method, but xml-data works as expected. I have the latest Scryber package from NuGet.

 
New Post
11/11/2015 3:59 PM
 

Ok.

There are 2 attributes...

 @xml-node-data - that can be bound to items of type System.Xml.XmlNode, and 
 @xpath-data - that can be bound to items of type System.Xml.Xpath.XPathNavigator

Depending on the type of object you are binding to one of these should work for you.

Let me know if you still have issues (I'm just trying to understand why you are not getting the latest schemas, and therefore the latest libraries).

 
New Post
11/11/2015 4:54 PM
 

Ah, I see. I know what's going on. I was attempting to bind an XPathNavigator instance using xml-node-data, which will obviously fail. My confusion came from THIS thread, where it was said that xml-data was being deprecated, and I assumed xml-node-data was using the same object type to perform the data bind. Will the binding of an XPathNavigator be removed? Should I change my implementation to bind off an XmlNode object?

 
New Post
11/11/2015 6:37 PM
 

Glad it is sorted for you. 

And no, definitely not - XPathNavigator is the better of the 2 (we actually convert the XmlNode data to a navigator).

Still not sure why it is not in your schema files though. Only thing I can think is that it there have been modifications made to scryber.data locally and NuGet is not replacing the file when upgrading from a previous version to 0.9.0.0

 
Previous
 
Next
HomeHomeScryberScryberIssues and Defe...Issues and Defe...xml-node-data fails to bind XML data from item collectionxml-node-data fails to bind XML data from item collection