transform

Is it possible to pass a parameter to XSLT through a URL when using a browser to transform XML?

When using a browser to transform XML (Google Chrome or IE7) is it possible to pass a parameter to the XSLT stylesheet through the URL? example: data.xml <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="sample.xsl"?> <root> <document type="resume"> <author>John Doe</author> </document> ...

Binding TRANSFORM query in Access to a report

Whats the best way to bind variable column names to a report field in Access when using a crosstab query? ...

How can a transform a polynomial to another coordinate system?

Using assorted matrix math, I've solved a system of equations resulting in coefficients for a polynomial of degree 'n' Ax^(n-1) + Bx^(n-2) + ... + Z I then evaulate the polynomial over a given x range, essentially I'm rendering the polynomial curve. Now here's the catch. I've done this work in one coordinate system we'll call "data sp...

WPF: How to apply a GeneralTransform to a Geometry data and return the new geometry?

Having some Geometry data and a Transform how can the transform be applied to the Geometry to get a new Geometry with it's data transformed ? Ex: I Have a Path object that has it's Path.Data set to a PathGeometry object, I want to tranform the points of the PathGeometry object in place using a transform, and not apply a transform to the...

3D Geometry: Transform One Pair of Points to be Aligned Parallel to Another

I have a line (actually a cube) going from (x1,y1,z1) to (x2,y2,z2). I would like to rotate it so that it is aligned along another line going from (x3,y3,z3) to (x4,y4,z4). Presently I am using Math::Atan2 along with Matrix::RotateYawPitchRoll. Any better ways to do this? Edit: I think I've worded this post very badly. What I am actuall...

Applying Transforms to 3D models - Normals pb.

Hello, I'm trying to apply a transform to a 3D object in a STL File (without creating a structured mesh object). Here is how I proceed: I read the normals and faces information one by one in the STL file, apply my transform to each vertex and to the face normal and write back the new computed values in another STL file. The vertex are OK...

Direct3D Geometry: Rotation Matrix from Two Vectors

Given two 3D vectors A and B, I need to derive a rotation matrix which rotates from A to B. This is what I came up with: Derive cosine from acos(A . B) Derive sine from asin(|A x B| / (|A| * |B|)) Use A x B as axis of rotation Use matrix given near the bottom of this page (axis angle) This works fine except for rotations of 0 (which...

Hibernate transform SQL to Criteria

Hello, I 'd like to use Criteria for my SQL query. I have 3 tables "home", "person" and a third table "liveIn" for correspondance between home and person. My sql query is "select home.id from home, person, liveIn where home.country = 'Japan' and person.id = '15' and liveIn.Homeid = home.id and liveIn.PersonId = person.id" A little hel...

LINQ or XSLT to turn one Element into another in Visual Basic 9

Short version: Could anyone suggest or provide a sample in LINQ to XML for VB, or in an XSLT of how to change one XML element into another (without hardcoding an element-by-element copy of all the unchanged elements)? Background: I have an XML file, that I think is properly formed, that contains a root entry that is <collection> and ...

Use XSL to generate dynamic XSL that is executed within the same script?

Hello all, I want to dynamically create variables with dynamic names for later use in my transform, but to do this I'd need to dynamically generate XSL and then run it in the same script. This is just a rough pseudo code example of what I'm looking for. <xsl:for-each select="//constants/constant" > <xsl:variable > ...

Widget "flip" behavior in Core Animation/Cocoa

I'm trying to make a Card class that duplicates the behavior of Dashboard widgets in that you can put controls or images or whatever on two sides of the card and flip between them. Layer backed views have a transform property, but altering that doesn't do what I would expect it to do (rotating the layer around the y axis folds it off ...

How do I efficiently transform a series of strings in powershell?

Suppose I have a large number of strings formatted something like: <tag>blah blahXXXXXblah blah</tag> I want to transform these strings into something like: blah blahZZZZZblah blah on a powershell command line. All instances of XXXXX get replaced by ZZZZZ in the transformation and the outer tags are stripped out. It isn't well-fo...

XSLT - Recursively Working Outwards

I understand how to process this doc (below) with XSLT from the outermost person element to the innermost. But I was wondering if: 1) If its possible to work from the deepest element out. 2) What that would look like given my example. <?xml version="1.0" encoding="utf-8" ?> <container> <person name="Larry"> <person name="Moe"> ...

Convert static files into MySQL entries

I am converting about 4000 text files that contain HTML into MySQL database entries. Seems like an easy way to do this would be to add a couple lines to the HTML to make them appear as XML files, then XSLT the XML into MySQL INSERT statements. (Building a CSV would also work, but less optimal IMHO). I've tried doing this but am having li...

WPF: Getting new coordinates after a Rotation

With reference to this programming game I am currently building. To translate a Canvas in WPF, I am using two Forms: TranslateTransform (to move it), and RotateTransform (to rotate it) [children of the same TransformationGroup] I can easily get the top left x,y coordinates of a canvas when its not rotated (or rotated at 90deg, since ...

When are Schwartzian Transforms useful?

While going through the "Intermediate Perl" book I noticed a section on Schwartzian Transforms and tried the example in the exercise (9.9.2) but noticed that multiple runs resulted in the transform taking more time then the normal sort. The code here performs a simple sort of the files in the windows\system32 directory based on file size...

How do I chain scale animations with an iPhone UIImageView?

I'm trying to scale an image down, change the image, then scale it back up. CABasicAnimation* shrink = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; shrink.toValue = [NSNumber numberWithDouble:0]; shrink.duration = 1; shrink.delegate = self; [myImageView.layer addAnimation:shrink forKey:@"shrink"]; makes the shri...

Efficient Line Drawing In Direct3D (Transformation2D?)

Background: I'm using the SlimDX C# wrapper for DirectX, and am drawing many 2D sprites using the Sprite class (traditionally from the Direct3DX extension in the underlying dlls). I'm drawing multiple hundreds of sprites to the screen at once, and the performance is awesome -- on my quad core, it's using something like 3-6% of the proce...

XSLT/Java: ERROR: 'Cannot find external method 'max' (must be public).'

I am copying an example from XSLT Cookbook: 2nd Edition (O'Reilly: Mangano, 2006) where Mangano creates a tree diagram with SVG. As a way to quickly test this code, I am simply transforming the XML using JSTL's <x:transform/> tag, and running it in Jetty 6. The XSLT seems to be getting hung on calling java:java.lang.Math:max, saying: ...

Dynamically Change a Rotation Animation in WPF

I am using a DoubleAnimation to anamiate the Angle property of a RotationTransform. Several times per second, I need to change the rate of the rotation in response to external data so that the rotation speeds up and/or slows down (smoothly) over time. I am currently doing this by using a DoubleAnimation that repeats forever from 0.0 to 3...