小编Elk*_*cho的帖子

使用XSL-FO在PDF中添加换行符?

尝试使用XMLSpy创建基于XML和文件的PDF文件.

我正在尝试根据字段内容将字段拆分为两行.

例如,如果我的varialbe ="John Doe AKA Johnny D",我想这样看:

约翰·多伊

约翰尼D.

我的问题是,即使网上的所有样本,我都无法使其工作.

这是我的代码:

     <xsl:value-of disable-output-escaping="yes" select="concat(substring-before(//MyField,'AKA'),$newline,substring-after(//MyField,'AKA'))" /> 
  </xsl:when>
Run Code Online (Sandbox Code Playgroud)

所以基本上,eveytime我找到了"AKA"字符串,我想把这个字段分成两行.所以我的代码,找到字符串,创建新变量,但仍然显示在一行.我尝试使用各种技术创建一个带空行的变量,但仍然显示在一行中.

有什么想法吗 ?

xml xslt xsl-fo

11
推荐指数
1
解决办法
2万
查看次数

AVAudioPlayer无法在iOS7上运行

我已经尝试了这里找到的所有不同选项,甚至使用NSData来加载音频文件.我尝试过mp3,m4a,caf文件,但没有任何工作.

没有错误消息,没有.

这是一款使用XCODE 5,iOS7的新应用.

这就是我正在使用的

- (void)playOnce:(NSString *)aSound
{


    AVAudioSession *audioSession = [AVAudioSession sharedInstance];
    [audioSession setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker error:nil];
    [audioSession setActive:YES error:nil];

    // Gets the file system path to the sound to play.
    NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:aSound ofType:@"m4a"];

    // Converts the sound's file path to an NSURL object
    NSURL *soundURL = [[NSURL alloc] initFileURLWithPath: soundFilePath];
    AVAudioPlayer * newAudio=[[AVAudioPlayer alloc] initWithContentsOfURL: soundURL error:nil];


    [newAudio prepareToPlay];

    // set it up and play
    [newAudio setNumberOfLoops:0];
    [newAudio setVolume: 1];
    [newAudio setDelegate: self];
    [newAudio …
Run Code Online (Sandbox Code Playgroud)

avaudioplayer ios7 xcode5

4
推荐指数
1
解决办法
6152
查看次数

标签 统计

avaudioplayer ×1

ios7 ×1

xcode5 ×1

xml ×1

xsl-fo ×1

xslt ×1