transform

Problem with javax.xml.transform.Transformer. Empty element not showing properly in editor but in Browser.

I have used javax.xml.transform.Transformer and javax.xml.transform.TransformerFactory and org.w3c.dom.Element and org.w3c.dom.Node to create XML file as per my requirement. Its creating XML successfully. The only problem is : <MYADDRESS NAME="AA00001"> <ATTN1>a</ATTN1> <ADDRESS></ADDRESS> // This is empty ADDRE...

Rotating an image in canvas and keeping it draggable

I have an image that I draw on a canvas. When the mouse clicks and drags I get the mouse coordinates and use them to set the positionX and Y of the image. After that's been done I redraw the canvas. That works like a charm and I can move the image over the canvas. But now I make 2 buttons so I can rotate the image left and right. When I...

CSS Transform Rotate letter alignment

Im using CSS Transforms to rotate an h2 5deg. For some reason the letters are out of alignment. Take a look at an example here http://dev.bestprintideas.com/bpi/image.png Heres the CSS .note-offer h2 { color: #626262; text-shadow: none; text-transform: none; margin: 15px 0 10px 25px; -moz-transform: rotate(-5d...

How to shift item position on iPhone and iOS

Sorry guys, I hate asking dumb questions but I have seriously been searching for days online to no avail. Every method I've tried with item.bounds or the like has failed miserably. I'm just trying to move some elements, like a UILabel and a UIButton over a few pixels under a certain circumstance. Just a simple point to a tutorial that I ...

XSLT -> Blank xmlns="" after Transform

Hello, I'm using an XSLT to transform from one XML standard to another. The particular resulting XML standard contains a root element which is part of a namespace and a child node which is part of another namepsace. The transform successfully reflects these namespaces but the child's child now contains a blank xmlns attribute. How ca...

Select Attribute of XML Node within a Namespace with XSL

I have the following XML and I am trying to get a reference to the media:thumbnail and media:content URL attributes using the value-of statement in the XSL. I am able to get the title, link, description, etc, but not the media nodes and their attributes (url, width, height for thumbnail and url, medium, type, width, and height for group)...

Translate a WPF canvas at high scale factors isn't smooth away from origin

Imagine you have a canvas that you want to scale to a very high value and then allow "panning." A good example is a geographic tool that needs to allow panning with "zoom" levels from the extent of the whole earth down to the extent of a few meters. I've found that if you are scaled in to more than, say 500,000, translating becomes ver...

xsl:apply-template to only nodes with specific attribute value

Hello, I have an XML document which I'm subjected to an XSLT. The structure is similar to: <root> <item value="1"> <object/> </item> <item value="2" /> <object/> </item> </root> My goal is to end up with a transformed XML similar to: <root> <parent> <object-one value-one="1"/> </parent> <parent> <object-two...

create map using two array

i am trying to create map using two array here is code #include <algorithm> #include <iostream> #include <map> #include <utility> #include <iterator> #include <string> using namespace std; using std::transform; int main(){ const char* word[]={"A","B","C","D","E"}; const char * clue[]={"a","b","c","d","e"}; map<string,strin...

How do I connect this css3 webkit animation to an element when it is clicked?

I know, a very simple question, but I don't know! I have: .touch img{ -webkit-transform: scale(2); } How would I make that activate when someone clicks on the element? Thanks! ...

iphone - animate a view to a new width and height

The following animates a view to the upper left part of the screen (ipad): [UIView beginAnimations:@"anim" context:nil]; [UIView setAnimationDuration:5]; [UIView setAnimationDelegate:self]; someView.frame = CGRectMake(0, 0, 1024, 768); [UIView commitAnimations]; However, it does not resize the view (think of a UIImageView that I w...

iphone sdk - positioning of custom items within UIScrollView during zooming

Hello, my application has a UIScrollView with a UIView as subview. Both are the same size. The scrollView contains a large image and the subview is a "overlay" view that holds markers that are set when the user taps at the large image (a map). It is basically a simple app that allows to set markers on certain locations on a map. so far...

iOS: UIVew & CALayer - 2D vs 3D transforms

in my previous code, I changed the coordinate system in my view's drawRect, so that the rectangle had 0,0 in the centre, 0,1 at the top centre and 1,0 in the centre of the right edge. I.e. a normalised Cartesian system. { // SCALE so that we range from TL(0, 0) - BR(2, -2) CGContextScaleCTM (X, 0.5 * bitmapSize.width, -...

iOS CALayer: Problem creating custom coordinate system

I have a layer that takes the whole iPhone screen. I want to change the coordinate system so that (-1,-1) is in the bottom left, and (1,1) in the top right; for the layer and its sub layers. how do I go about it? This isn't as easy as setting the transform: previously I was overriding my view's drawRect, and accomplished the transf...

Matrix3DProjection exists in Silverlight but not in WPF ?

I need a taper-effect on my transform in WPF. Charles Petzold wrote some nice stuff about it for example : http://www.charlespetzold.com/blog/2009/07/Using-the-Matrix3DProjection-Class-in-Silverlight-3.html But now it seems that the used Matrix3DProjection class only exists in Silverlight, and NOT in WPF..? (Why would Mirosoft think it ...

How to specify a sortBy through a javax.xml.transform.Transformer.transform() call?

I'm using javax.xml.transform.Transformer.transform() to convert one xml to another through an xsl stylesheet. I would like to programatically set the sorting of the first level of children, but am unsure how to go about it. I've checked out the docs, but I don't understand which type of property/parameter to use and how to specify in so...

VS2010 Build Deployment Package web.release.config transform error

I am getting the transformed web.config in the deployment package incorrectly transformed. The result is as follows (notice how the connection string gets generated): <connectionStrings> <add name="xxxConnectionStringNamexxx" connectionString="$(ReplacableToken_xxxConnectionStringNamexxx-Web.config Connection String_0)" pr...

Referencing inserted elements in a single pass

I'm trying to insert unique IDs and references to those IDs using a single XSLT file. Given the XML: <Parent> <Name>Dr Evil</Name> <Child> <Name>Scott Evil</Name> </Child> </Parent> And this XSLT snippet after an identity transform: <xsl:template match="Parent"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:...

Is it possible to set different duration/delay for transform options?

I want to set several transform options for my html object but with different duration and delay. If i try to use something like that: -webkit-transition: -webkit-transform, opacity; -webkit-transform: rotate(180deg) scale(2); -webkit-transition-duration: 2000ms, 6000ms; -webkit-transition-delay: 0ms, 6000ms; Then i will have diffe...

WPF: Transforming a model's position(s) directly

Hi; I'm new to WPF, and I'm trying to understand the underlying architecture, so please correct me if I'm wrong: As far as I know, there are three possibilities to dynamically transform a GeometryModel3D during runtime: a) Set the model's Transform-property to a Transform3DGroup once, to which you add new / duplicate Transformations. ...